Questions tagged [razormediator]

The Razor mediator for Tridion is an alternative template engine. It provides the power of .net and the well documented Razor syntax. Using the syntax it's possible to access Component fields and template package items. Examples of use are: @Component.Fields.title, @Component.Image.alt_text or @Fields.Metadata.publish_date.ToString(“dd/MM/yy hh:mm”)

Filter by
Sorted by
Tagged with
0
votes
1answer
41 views

Publishing issues in Razor templates with CrowdStrike Windows Sensor software update

We are on SDL Web 8.5, There is a legacy implementation in some publications for which we are using razor templates. Razor Mediator: Tridion.Extensions.Mediators.Razor, Version=1.3.3.0 Whenever ...
2
votes
3answers
215 views

XPM in SDL web 8.5 with Razor Mediator

In SDL Tridion 2013 SP1, we were using Razor Mediator built-in property/function "IsSiteEditEnabled" in our Razor functions. Based on its value if IsSiteEditEnabled is true or false we were adding the ...
1
vote
0answers
55 views

After uninstall Tridion, SDL Web Content Distributor Transport Service not removed

We have installed SDL web 8.5 publisher on separate server, as some of services are not starting due to missing configurations, we uninstalled SDL web 8.5 using .exe. After that when we verified the ...
1
vote
1answer
110 views

Razor template with tridion sites 9 without razor-mediator

I am trying to preview razor template enabled page but I am getting error "Unable to get template type with ID 8 for item tcm:xx-xxxx-xxxx." not sure it requires Razor mediator to be installed. but ...
3
votes
2answers
163 views

Is Razor Mediator compatible with Tridion Sites

We are planning to upgrade Tridion 2013 SP1 HR1 with Razor Mediator to Tridion Sites 8.5. Are there any breaking changes in 8.5 for Razor Mediator? Will Razor Mediator be supported in Tridion 9?
1
vote
1answer
58 views

How to get multimedia component data in razor mediator?

There is a scenario to fetch an excel file which has been inserted on a multimedia component using Tridion razor mediator. Note: I have tried to get the excel file but I am getting the TCM Id of the ...
1
vote
0answers
38 views

XPM in Embedded Schema Fields its not able to update except index value in Razor Template?

Razor Code @FieldStartMarker("Component.Fields.footerquicklinks") @FieldValueStartMarker() <span class="links">@Component.Fields.footerquicklinks.quicklinktitle</span> @...
8
votes
3answers
379 views

Publisher service not finding Razor Helper methods

We are using Tridion 2013 and the Razor mediator. We import Razor Helper Functions in the Tridion.ContentManager.Config file, like so: <add import="/webdav/xxx Design Master/Building Blocks/...
2
votes
2answers
73 views

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

I have around 50 lines of code in multiple page templates. I am not able move it to a component template as I need component and template ID from page and render some text from the components in ...
10
votes
2answers
833 views

Experience Manager and Razor templating

I have one simple question: We are using Razor templating in Tridion 2013 SP1. Is it including the Experience manager tags to the generated HTML? Or Do we need to add the EM tags manually?
5
votes
2answers
596 views

Mixing JSON data and Razor in Tridion 2011 Razor Template

I'm creating a Razor Component Template in Tridion 2011. In this template I want the output to be in JSON format. Now how do I mix the two languages? JSON should be seen as HTML not as code. Example: ...
3
votes
2answers
214 views

Razor Mediator for Web 8

Does Tridion Razor Mediator Supports SDL Web 8. I am able to download the installer from the below path,but its in beta version. https://drive.google.com/drive/folders/0B6hZ-cambftrV25ZLU5QTnJWSmM Can ...
7
votes
1answer
113 views

Content Porter skips Razor TBBs when importing

I can export Razor TBBs just fine from my Tridion 2013 SP1 system (using Content Porter 2013 SP1), however whenever I import, it skips them - they are not counted in the successful or failed items in ...
1
vote
2answers
426 views

Anchor tag is not working inside the list

I have a Template to render the list class with anchor tag, it is working fine in Template Builder as well as in the preview mode in CMS. But in the browser after publishing the Page, I can able to ...
1
vote
3answers
162 views

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

My C# TBB returns Keywords from a specific Category as XML: XmlDocument keywordsXml = new XmlDocument(); keywordsXml.LoadXml(cat.GetListKeywords().OuterXml); Item output = package....
9
votes
1answer
457 views

Razor mediator integration with UI2012 - Best practices

We are using Razor Mediator 5.3 templating engine with Tridion 2011 SP1 edition and host an ASP .NET 4.0 application. Now, we are trying to integrate UI2012 with the application. I need some ...
1
vote
1answer
41 views

Imported RAZOR TBB in Workflow does not render

We are seeing an issue that when a template has a RAZOR TBB with an import: @importRazor("ContextLookupRCTBB.cshtml") Workflow can be started on the imported RAZOR TBB, but the in workflow version ...
3
votes
1answer
32 views

Checking non-nullable fields for values in Razor Mediator

I have a datetime value in a component's metadata that I need to access and write out in a component design using the Razor Mediator. Since this is a non-mandatory value I really need to check if it's ...
6
votes
1answer
299 views

Translating months in Razor

The Razor mediator allows for some formatting of datetime fields when they are rendered. For example, @Metadata.EventDate.ToString("MMMM") will render out the full text of the month. However, for ...
0
votes
1answer
49 views

Razor Mediator extra Text tags appearing in HTML

Using an if statement while templating using the Razor mediator: @if (...) { <text><div></text> } @if (...) { <text><div></text> } @if (...) { <text&...
8
votes
1answer
256 views

Razor Mediator Helper Functions TBB Not Working with Experience Manager Preivew

We have a page region in XPM and it works fine with adding/removing components until you add the 6th+ component to it. After doing so the following error is produced: TemplateCompileException: ...
3
votes
2answers
130 views

Embedded Razor Templates

are there any limitations with embedded razor templates. The issue: <span>Level0</span> @importRazor("/webdav/020-D%20Design%20Master/Building%20Blocks/System/Template%20Building%20Blocks/...
0
votes
4answers
120 views

DD4T with Razor Templating - feasibility

In regular DD4T Page properties and Component fields are exposed as ipage and icomponent. Field values are bound to HTML at run time. But my client claims why we need to construct HTML for every ...
5
votes
2answers
112 views

Razor Mediator Template Timeout on Save

After well over a year of good performance, suddenly I am unable to save almost all razor templates in our dev environment. Also publishing (rendering) of items which use razor templates is extremely ...
7
votes
3answers
514 views

Editing Razor TBBs in Visual Studio

Using Visual Studio 2012 I am able to edit Razor TBBs by opening and saving them back via webdav. The problem is that if there is a Razor syntax error, it seems like they are saved OK, but actually ...
2
votes
1answer
628 views

How to retrieve component by specific Schema?

I have a schema id. based on that schema id i want to retrieve all components modified date (created by that schema). How to resolve it?
4
votes
1answer
202 views

Razor templating “Namespace name 'KeywordModel' could not be found”

I'm getting the following error when publishing a DCP using a Razor TBB that has references to the KeywordModel class. TemplateCompileException: CS0246: The type or namespace name 'KeywordModel' ...
9
votes
2answers
204 views

Using Tridion2012UI Experience Manager tags with Razor templates

I'm trying to use Dominic Cronin's Tridion2012UI functions as detailed at https://github.com/TridionPractice/tridion-practice/wiki/TridionUI2012FunctionsForUseInHtmlTemplates with Razor templates. I ...
4
votes
1answer
182 views

Access the field path of an item inside of a foreach loop using razor templating?

I am converting a DWT into a Razor template. In the Razor template I have a foreach loop. Inside of that foreach loop I am attempting to render a field of the current item using RenderComponentField....
9
votes
4answers
559 views

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

When saving a Razor Mediator Template it fails anytime that I have an if statement with unbalanced html tags in side of it. @if (Fields.subtitle != null) { <div class="subtitleColor"...
-4
votes
2answers
703 views

how get the current page URL in Razor Template and TOM .Net?

I want to get current page url in my razor code.how to retrieve that?
11
votes
1answer
598 views

Adding line breaks in plain text when using Razor

I'm working on a Razor template to add plain text to an outbound email. I notice that if I just add the fields without any logic: @Fields.Title @Fields.Subtitle I am able to get line breaks. ...
5
votes
1answer
147 views

Using Razor Mediator for Outbound Email Templates

We are currently writing a number of Outbound Email templates. As all other templates are using the Razor Mediator, we are also using this for our templates for Outbound Email. One of the issues we ...
8
votes
2answers
301 views

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

The following is a simplified example: I have a Razor Mediator template and a parameter schema. The parameter schema "News Article Class" is attached to the Razor template and contains the mandatory ...
1
vote
2answers
104 views

Exception while trying to render “ComponentPresentationList” pushed as a package variable “MainSectionComponents”

I have pushed a package variable of type "ComponentPresentationList" with name "MainSectionComponents". I have written razor template code to render the componentpresentation list. @foreach (var ...
0
votes
1answer
109 views

Issue in converting DWT page template to Razor Template page template

I am trying to convert my DWT page template to Razor template. This Page template has following JSP Code. <%@ taglib uri="http://jakarta.apache.org/taglibs/xtags-1.0" prefix="xtags" %> <%@ ...
1
vote
2answers
283 views

How to fetch an Multi value Embedded Schema Image field using razor?

I would like to fetch an imagefield from the multivalue Embedded Schema Field. Here is my code. @foreach(var banners in Fields.Banners) { @if(banners.RDBannerSchema.WebBannerImage.ID !=null) &...
2
votes
1answer
126 views

Loop thrugh StructureGroups with Razor MEdiator

I would like to get the Root Structure Group and then iterate through all immediate children of it using the Razor Mediator. Getting the root StructureGroup works, but it is a StructureGroupModel ...
2
votes
1answer
100 views

How to get the Session in a Razor template

I would like to get the session in a Razor Template. I have tried TridionHelper.Session and also Session and _session with no luck. Any ideas?
0
votes
1answer
93 views

TemplateCompileException while working with array in razor [closed]

I'm having a difficult time getting the below code to work. It's choking on the testArray[Count] = "asdf" statement. How should this statement be written? <ul class="product-options--list"> @...
3
votes
1answer
91 views

Publishing a Razor Page Template fails with “config changed by another program”

I have Razor Mediator 4 Tridion 1.3.3.1 installed on Tridion 2013 SP1 with a single publisher. When I attempt to publish a page template, it fails in the publishing queue. The error message shown is,...
6
votes
2answers
203 views

unable to get template type with id:8 while publishing

I'm Using Razor Mediator and when I publishing i'm getting unable to get template type with id:8 while publishing.
3
votes
1answer
502 views

Why do we need to add NT AUTHORITY\SYSTEM to impersonation users?

A customer is experiencing a problem which seems to be related to the Razor Mediator. They have a template which makes use of a webdav connection in it. When they publish a page using the template ...
2
votes
1answer
315 views

Publish binaries in a package - more info

I have some doubts related to "Publish binaries in a package" default TBB referred in Default Finish Actions. Created the Component Template and added default finish actions TBB in my CT. CT Design ...
3
votes
1answer
161 views

Memory leak Issues with Razor Mediator 1.3.3

We started using Razor Mediator 1.3.3 for our template designs. We notice there is memory leak during the publishing. We have written some reusable custom function razor and using in our razor design. ...
8
votes
1answer
211 views

Razor Mediator and Tridion Media Connector

We are experiencing a very strange situation with Razor Mediator (v 1.3.3.0) development in Tridion 2011 SP1 with Media Manager Connector on Windows 2008 R2. The first time that you open a Razor TBB ...
3
votes
1answer
130 views

Razor templating source code version

I installed Razor templating v1.3.3.1 in our system (Tridion 2013 SP1). This is the last version of Razor templating. I want to modify this version to add some log outputs. But in the source code of ...
4
votes
1answer
287 views

How can I check if a linked Component is first in the list?

I have the following syntax in a template using Razor Mediator: <tcdl:ComponentField name="Fields.contact_nav"> @foreach (dynamic link in Fields.contact_nav.links) { @if(link....
1
vote
2answers
130 views

Publishing Issue: Default Resolver not resolving from Page

When i publish page, Publishing queue shows success but nothing is delivered to file system. Its happening with all the pages which were working fine earlier. I do not have any event-handler, Custom ...
4
votes
1answer
150 views

Razor mediation function throwing invalid arguments error

Not sure if I'm missing something obvious here, thought I'd post the question before I stop working on it hoping that someone can shed some light on the issue. So I have the following in my razor ...