Developer forum

Forum » Templates » combining razor and dynamicweb html tags

combining razor and dynamicweb html tags

Martin Kure
Reply

Hi all,

I have an old html-file, that contains several html-dynamicweb-tags like: <!--@ContentPlaceholder--> , <!--@Include()-->, etc. Recently I wanted to add some razor-code to that file. I don't know if it's possible, but have checked, that I can add dynamicweb-html-tags in another razor file, without problems.

I have converted the old html-file into a razor -cshtml-file and have added the razor-code:

@Include("xxxx.cshtml")

@cart()

On the page the included file is included properly, but it's being treated as text, without being rendered as razor code.

Is it impossible to combine the two types of code (html-dynamicwe-tags and razor)? 

BR

Martin

  


Replies

 
Martin Kure
Reply

Found a work around.

I've added the razor part in a paragraph-template and then added the global paragraph - might not be pretty, but it seems to work.

 

You must be logged in to post in the forum