Why is Razor Template not displaying in Tridion (after installing it)?

563 Views Asked by At

I have installed Razor mediator 1.2 at Tridion server and that server also having .NET 4.0.

I have restarted all service as they has suggested in the Razor-mediator docs.

After installing, the RazorTemplate option is not displaying in the TemplateType dropdown, when we try to create a new TBB.

Any ideas on why RazorTemplate option is not showing in Tridion?

4

There are 4 best solutions below

0
On

Could you please check that you are looking COM+ at right place see Screenshots ---

Wrong :-![Wrong Place][1]

Right Place Right:- ![]

enter image description here

1
On

Some suggestions:

  • If you have correctly followed all steps, you should try clearing your browser's cache. It often does the trick on these cases.

  • If still not working, you may check the Tridion.ContentManager.config, and search for any reference to razor. If you can't find any, it means that the installer didn't work correctly. (Maybe execute again with admin privileges)

  • Make sure you are creating a TBB and not a Component Template. Razor Templates are Tbb's

1
On

You may try reinstalling again.

0
On

Check your Tridion config file Tridion.ContentManager.config for the following, assuming the Installer installed successfully. You could verify this from GAC assembly and also double check the PublicKeyToken with the config as well.

Mediators Section:

<mediators>
...
<mediator matchMIMEType="text/x-tcm-cshtml" type="Tridion.Extensions.Mediators.Razor.RazorMediator, Tridion.Extensions.Mediators.Razor, Version=1.2.0.0, Culture=neutral, PublicKeyToken=5eeceedb34d9dfd7" />

</mediators>

Config Sections:

<configSections>
.....
<section name="razor.mediator" type="Tridion.Extensions.Mediators.Razor.Configuration.RazorMediatorConfigurationSection, Tridion.Extensions.Mediators.Razor, Version=1.2.0.0, Culture=neutral, PublicKeyToken=5eeceedb34d9dfd7" />
...
</configSections>

Template Types:

<templateTypes>
..
      <add id="8" name="RazorTemplate" mimeType="text/x-tcm-cshtml" hasBinaryContent="false" contentHandler="Tridion.Extensions.Mediators.Razor.RazorContentHandler, Tridion.Extensions.Mediators.Razor, Version=1.2.0.0, Culture=neutral, PublicKeyToken=5eeceedb34d9dfd7">
    <webDavFileExtensions>
      <add itemType="TemplateBuildingBlock" fileExtension="cshtml" />
    </webDavFileExtensions>
     </add>
</templateTypes>

If you have all the configuration correct, then this could be just caching of the UI.

You can force the clear cache by updating the modification count in System.config (web\WebUI\WebRoot\Configuration) .. 8 is just the number on my cms, this could be different for your CMS.

<server version="6.1.0.55920" modification="8">