9 votes

How to include partial (unbalanced) html in a Razor Mediator if statement?

According to this helpful post by Dominic Cronin You can use "text" tags in order to do this. So the final if statement looks like this: @if (Fields.releaseMediaTitle == null) { <text> ...
8 votes

How to determine if publishing to SiteEditable/XPM-enabled site?

If you are using Razor Mediator to build your layout you can use its built-in function IsSiteEditEnabled. The Razor Mediator v1.3.3 documentation has the following example. @if (IsSiteEditEnabled) { ...
8 votes
Accepted

How do you access the field of a parameter schema from a Razor Mediator Template?

You have three options to retrieve any values from the package, which would include parameter schemas: @Package.ItemName @Package.GetByName("ItemName").GetAsString() @Package.GetValue("ItemName")
  • 2,512
7 votes

Access a page's package from a component template on the page?

A way to pass variables across template scopes of the same rendering session is via Context Variables hash map. See Tridion docs for usage. A mix of concerns is a caveat to consider here. So this ...
7 votes

Special Characters not rendering properly on live website

There are normally three places that I would check for character display issues such as this: Do the characters look correct inside of the Components in the Tridion Content Management Explorer (CME)? ...
7 votes
Accepted

What really happens when we restart the Tridion Publisher service?

The Publisher for sure caches objects, but the lifetime of that cache is normally from the point the the Publish Transaction is picked up from the queue to the point that rendering (of all items in ...
6 votes

Which Element or CSS selector to use for custom CME logo?

A few options, starting with the easiest: .frame-navigation-logo is the class used to render the SDL logo in the slide-out sidebar. It currently uses a background image to render an image sprite that ...
6 votes

How to pass Component information to a user control

Achieving this can be quite simple or complicated. The easiest thing to do would be use an inner property on your user control so you get something like this: <TestUC:TestUC runat="server"> ...
6 votes

Generate JSON objects

A google search for "tridion json" gives me quite a few decent results, particularly this one. Serializing to JSON is not that hard - except when dealing with Rich Text fields and when deciding what ...
  • 29k
6 votes

Subclass templates in tridion

Assuming this is compound templating and we are talking about a page template I would suggest breaking up the page template into separate visual blocks to be rendered as component presentations (as is ...
6 votes

How to assign the value of a component link field to an XML element?

As Peter mentioned in his comments that your question is unclear. But if I consider your last comment which says its a "Object Reference" error, So I think it would be best to check the Objects ...
6 votes
Accepted

How to assign the value of a component link field to an XML element?

I'd cover all bases and check if the schema field exists (what if someone renames this later or you decide to allow another schema that only has some of the currently covered fields)... ...
6 votes
Accepted

Location of .net TBB dll's on the CM server?

They're not stored on the CM server. When you upload a .Net Assembly TBB it is uploaded to a temporary directory on the server and then the Assembly is stored as binary data in the Content Manager ...
6 votes
Accepted

DD4T - Generate DD4T.Templates.merged.dll using ILMerge manually

According to the post-build script these are the dlls to merge: DD4T.ContentModel.Contracts.dll DD4T.ContentModel.dll DD4T.Templates.Base.dll DD4T.ContentModel.XmlSerializers.dll DD4T.Serialization....
  • 523
6 votes

Outbound email TBB not uploaded in CMS 2013 SP1

Open Template Builder Click the Tools menu and select Create Default Building Blocks Select the parent folder to your Default Templates folder (i.e. if your default templates are currently in Building ...
  • 19.8k
6 votes
Accepted

Razor templating in Xview framework

@Marlowe, glad to hear that you like XView :) I've created this quick video to show how you can use XView in combination with RazorEngine to develop Tridion TOM.NET templates with ViewModels, Razor ...
  • 523
6 votes
Accepted

Unable to delete item. The item is published

I'll suggest an approach, hopefully it will work. Create the target again with the exact same name. Since the target is no longer there, you can recreate the target with dummy values for deployer. ...
6 votes
Accepted

Outputting SVG image assets inline - can it be done?

We have a TBB "Output Multimedia Component as String", which may (or may not!) work for you with a little adaptation: BinaryContent binaryContent = component.BinaryContent; byte[] bytes = ...
  • 1,441
5 votes

Access a page's package from a component template on the page?

Because the page and the component presentations are separate render operations they each have their own package; as such variables pushed into the package in the page template are not visible or ...
5 votes
Accepted

Subclass templates in tridion

As per your suggestion in the question, there is nothing wrong with rendering a User Control tag and passing the data from Tridion into it, or publishing an XML file from Tridion with the data and ...
5 votes
Accepted

How to include partial (unbalanced) html in a Razor Mediator if statement?

Many ways to do this, but two that haven't been listed: @{ var colorClass= Fields.subtitle != null ? "subtitleColor" : "no-color"; } <div class="@colorClass"> That has the advantage of ...
  • 1,441
5 votes
Accepted

DD4T Link Resolving in Rich Text Format Areas

Link resolving in DD4T 2 Java can be resolved in a couple of ways: In RTF Use the LinkResolverProcessor - this needs to be configured as Processor on the Component controller; Do it in the view ...
  • 7,253
5 votes

Get field value from multiple embedded component link from multiple embedded field

There are a couple of ways you can do this. If your solution is flexible on the language used in your designs you could use the Razor Templating Mediator, which is great at handling multivalue, ...
  • 2,512
5 votes

Get field value from multiple embedded component link from multiple embedded field

I think you know the issue; the linked components aren't added to the package by default. You have a couple of options here: Install the Razor mediator and have linked components accessible OOTB. ...
  • 2,920
5 votes
Accepted

How to get all keywords inside the particular category using C# TBB

Here are few things you should cross check as the code looks fine. As Pankaj already suspected , you might be using some config which your C# TBB won't be able to read/access , use the categoryID ...
  • 649
5 votes
Accepted

DXA 1.5 TBBs do not output Multimedia Component Field - External Url, recursively

DXA follows the behavior that SDL Web (or Tridion if you will) delivers, when using an External URL in a Multimedia Component, at Publish time, the content of the External URL is fetched and published ...
  • 29.6k
5 votes

Publishing an item should trigger publish from parent publication and avoid infinite loop

Instead of creating tbbs for managing publishing, i suggest using event system. It is much more elegant solution. You can manipulate objects via event system more easily and will have more control ...
  • 8,556
5 votes

Publishing an item should trigger publish from parent publication and avoid infinite loop

Not that this sounds like a particularly good idea but - are you sure you're not publishing with "publish child publications" checked? Also - you'll have to catch (using the Event System - which ...
5 votes
Accepted

How to consume XML sent by C# TBB in Razor template?

AFAIK, you won't be able to get the Keyword titles directly in a Razor TBB; however, you can create your own custom function in the Razor TBB that manipulates the XML and returns the titles. The ...
5 votes

Unable to debug Merged .NET assembly Template Building Blocks

Thanks all for the answers and comments. But it was a silly mistake from my side, So to upload the DLL (and other TBBs) in Tridon I was using the command below TcmUploadAssembly.exe config.xml "...

Only top scored, non community-wiki answers of a minimum length are eligible