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> ...
user avatar
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) { ...
user avatar
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")
user avatar
  • 2,512
7 votes
Accepted

VBScript code to Modular Templating

I will assume you are using Tridion 2013. Then you have 3 choices of Template Mediators in your architecture: DWT Razor Mediaor XSLT I prefer the Razor Mediator myself, since it has the best ...
user avatar
  • 10.2k
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 ...
user avatar
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)? ...
user avatar
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 ...
user avatar
6 votes

Getting values for HTML meta tags

If you are using normal Modular templating, the usual approach is to write a .NET TBB which you can put in your page template(s) and which uses some logic to read the 'Main' component on the page, ...
user avatar
  • 16.4k
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 ...
user avatar
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 ...
user avatar
  • 28.9k
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"> ...
user avatar
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 ...
user avatar
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 ...
user avatar
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)... ...
user avatar
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 ...
user avatar
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....
user avatar
  • 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 ...
user avatar
  • 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 ...
user avatar
  • 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. ...
user avatar
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 = ...
user avatar
  • 1,441
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 ...
user avatar
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 ...
user avatar
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 ...
user avatar
  • 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 ...
user avatar
  • 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, ...
user avatar
  • 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. ...
user avatar
  • 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 ...
user avatar
  • 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 ...
user avatar
  • 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 ...
user avatar
  • 8,401
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 ...
user avatar

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