Developer forum

Forum » Templates » Need help to find a elegant solution! Translation xml + include html

Need help to find a elegant solution! Translation xml + include html

Replies

 
Morten Bengtson
Reply

Can't you just include that html file and then use translation inside that file?

 

Other possible solutions:

... depending on what you are trying to achieve.

 

 

 
Andrew Mannell
Reply

Thanks Morten for the fast response,

Can't you just include that html file and then use translation inside that file?

Unfortunately adding the html file to the template would mean we would have to change over 30 templates every time we change a link.

Create a page based navigation and use the parenttag setting in dwnavigation to target it. See Designs & Layouts documentation.

We have translations for country names in the lists already, would start getting really messy.

I have tried a few ways in 8.2.1 including this (see below) which works but I like the idea of the "Items based website settings" is there any documentation?:

 

                  <!--@If(Global:Area.ID==150 || Global:Area.ID==126)-->
                      <div id="globalwebsitelist" class="floatwrapper"><!--@Include(../globalwebsiteslinkdisclaimer.html)--></div>
                      <!--@Else-->
                      <div id="globalwebsitelist" class="floatwrapper"><!--@Include(../globalwebsiteslinks.html)--></div>
                      <!--@EndIf-->  
 
Morten Bengtson
Reply

What I meant was to use Include() for including a specific html file and then use whatever magic inside of that file - instead of mixing translate and include like you did in your example.

 

There actually is some documentation for item based website settings. It requires Dynamicweb 8.2.1 or later version.

 

 
Andrew Mannell
Reply

Thanks Morten got you, One quick question can you use item types template tags in external html files, will they be rendered?

I got the whole include tag added using Items Types but unfortunately it was not rendered.

 

You must be logged in to post in the forum