Skip to main content
8 votes
Accepted

Translating months in Razor

It turns out that I was on the correct path, but had missed adding the proper using statement to my TBB. By inserting @using System.Globalization; at the top of my TBB I was able to use either of ...
Tanner Brine's user avatar
  • 2,512
5 votes

Publisher service not finding Razor Helper methods

Just in case anyone is still having this problem, I solved it by adding the NT AUTHORITY\SYSTEM account (the account that the Publisher Service runs under by default) as an impersonation user. This ...
Jonathan Williams's user avatar
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 ...
Sabarish Senthilnathan's user avatar
5 votes
Accepted

Is Razor Mediator compatible with Tridion Sites

The Razor Mediator is and community built extension and thus is not supported by SDL. However it is using the Modular Templating Framework and its supported extension points, so from that perspective, ...
Bart Koopman's user avatar
  • 29.6k
3 votes

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

Piggy-backing on the answers of Saurabh and Sabarish, I would suggest doing something similar, but moving the XML processing code Sabarish suggests (with Saurabh's modification) out of the Razor ...
Tanner Brine's user avatar
  • 2,512
3 votes

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

Adding to @Sabarish's answer, If you are interested in Titles only; get the lighter XML for Keyword list which only contains ID and Title. To do so you should apply the filter in your TOM.NET C# Code ...
Saurabh Gangwar's user avatar
3 votes

XPM in SDL web 8.5 with Razor Mediator

AFAIK - Question1: my question is whether the same IsSiteEditEnabled Razor mediator built-in function will work for SDL web 8.5 Answers: Yes. if you are using the legacy publishing target and ...
Velmurugan's user avatar
  • 8,215
3 votes

Checking non-nullable fields for values in Razor Mediator

Since you know that the default value for a datetime in Tridion is the minimum value of the datetime object, you can do a comparison like: if(!Metadata.Date.Equals(DateTime.MinValue)){ code } The ...
Tanner Brine's user avatar
  • 2,512
3 votes
Accepted

Which is better performance wise : Razor TBB or C# TBB?

The advantage of having it in Razor or DWT is readability of HTML. If you dump it all into a dirty C# TBB, you'll be coding all kinds of escaped strings with HTML - PITA to read/maintain/update IMO. ...
Nickoli Roussakov's user avatar
2 votes

XPM in SDL web 8.5 with Razor Mediator

This is somewhat related to my question here How to check publishing or rendering context using TOM.NET in the new publishing framework since you are dealing with publishing context. See the accepted ...
Bart Koopman's user avatar
  • 29.6k
2 votes
Accepted

Unable to read PublicationTarget in Razormediator Template Building block

publishContext.PublicationTarget.Title; is not working with razor , you can use Engine.PublishingContext.TargetType and see if you can get the target , if not create a .net Code and use it on your ...
Anand N S's user avatar
  • 1,936
1 vote

Publishing issues in Razor templates with CrowdStrike Windows Sensor software update

As far as I know the Razor mediator has no direct reference to CrowdStrike. It's an open source project, so you can inspect the code yourself at https://github.com/alex-klock/razor-mediator-4-tridion ...
Dominic Cronin's user avatar
1 vote

Razor template with tridion sites 9 without razor-mediator

Razor mediator is a community extension and not supported by SDL. For Sites 9, I do not recollect that Razor mediator would NOT be supported. You can refer the following answer from Bart as well. ...
Shiva's user avatar
  • 2,168
1 vote
Accepted

How to get multimedia component data in razor mediator?

To create and use Custom Dreamweaver Functions from a Razor Mediator. Refer to this below example, you can create one specific to your case. Create a custom class in C# using the TOM.NET API based ...
Velmurugan's user avatar
  • 8,215
1 vote

Is Razor Mediator compatible with Tridion Sites

I guess it's bit late to answer but we had to update IsSiteEditEnabled function for the razor mediator to work with SDL Web 8.5 for XPM functionality. If you are not using this function in your TBBs ...
Rakesh Choudhary's user avatar
1 vote
Accepted

Imported RAZOR TBB in Workflow does not render

In the Razor mediator, imports are essentially a text replace before the containing template gets compiled. To get a new version of the include to be used, you need to ensure that the mediator "...
Dominic Cronin's user avatar
1 vote
Accepted

Razor mediator integration with UI2012 - Best practices

Following the update given, parts of your question is answered by https://stackoverflow.com/questions/12175970/razor-templating-with-siteedit-ui-2012-ontridion-2011 For completley enabling UI2012/XPM ...
Bart Koopman's user avatar
  • 29.6k

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