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 ...
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 ...
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
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, ...
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 ...
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 ...
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 ...
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 ...
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. ...
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 ...
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 ...
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
...
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. ...
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 ...
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 ...
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 "...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
razormediator × 81templating × 20
2011 × 15
2013 × 13
experience-manager × 8
2013-sp1 × 7
publishing × 6
web8.5 × 5
content-manager × 3
web8 × 2
dd4t × 2
configuration × 2
dwt × 2
template-building-blocks × 2
razor × 2
content-delivery × 1
cme × 1
sdl-tridion × 1
workflow × 1
2011-sp1 × 1
tom.net × 1
upgrade × 1
sites-9 × 1
outbound-email × 1
content-porter-2013 × 1