Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more
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
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
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
4 votes

DD4T with Razor Templating - feasibility

A few rough answers on your questions: Simply considering DD4T is slower then Razor Templating is not a valid statement if you ask me. There will be a lot of questions you need to asnwer before you ...
Bart Koopman's user avatar
  • 29.6k
4 votes
Accepted

Razor Mediator for Web 8

Yes, it is supported in Web 8. You can download the latest version here, http://razor-mediator-4-tridion.googlecode.com/files/RazorMediatorInstaller_v1.3.3.1.msi There is also a nice presentation ...
robrtc's user avatar
  • 10.2k
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

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,150
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
3 votes

Embedded Razor Templates

When a template is compiled by the razor mediator, any embedded templates are resolved and the text is embedded before compilation occurs. The resulting assembly is cached, and that's the last time ...
Dominic Cronin's user avatar
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

Razor Mediator Template Timeout on Save

Looking at the error, it feels like that database is timing out. That is the case when you will see error "The transaction associated with the current connection has completed but has not been ...
Hiren Kaku's user avatar
  • 3,728
2 votes
Accepted

Razor Mediator Template Timeout on Save

It turns out the issue was related to a known bug in some versions of VMWare Tools. When it was updated to a stable version the issue was resolved.
Nate Niemi's user avatar
2 votes
Accepted

Razor Mediator Helper Functions TBB Not Working with Experience Manager Preivew

The final solution which solved this issue permanently was to change the razor mediator helper functions TBB into a .txt file. Loading the TBB multiple times in the same template was causing the ...
Nicholas Wetmore's user avatar
2 votes

DD4T with Razor Templating - feasibility

With either technique you are in some sense "constructing the HTML" for every request. As soon as you make use of, for example, dynamic links, you can't use static HTML any more, and need to have your ...
Dominic Cronin'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,150
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

Razor Mediator for Web 8

The Razor mediator integrates with Web 8 using supported APIs which have had no breaking changes since they were introduced. This means that you should have a good expectation that it works fine with ...
Dominic Cronin's user avatar
1 vote

Embedded Razor Templates

It seems to be the issue with TBB that are generating output to placed in broker DB. If you are using DD4T TBB for publishing then there is parameter LinkLevel, which identifies how much deep it ...
Hiren Kaku's user avatar
  • 3,728
1 vote
Accepted

DD4T with Razor Templating - feasibility

If performance is the also concern then pre-generating html is not only option. There could be other options to perform optimization. Perform output caching in the application and if application is ...
Hiren Kaku's user avatar
  • 3,728
1 vote

DD4T with Razor Templating - feasibility

The main purpose of using DD4T is to help with MVC based implementation. If the requirement is to generate html on content manager side then using DD4T will not help. You probably want to look into ...
Hiren Kaku's user avatar
  • 3,728
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