Developer forum

Forum » Templates » dynamic include tag

dynamic include tag


Reply

 

 

 

 

 

 

I need to dynamic edit the path to a included file via JS.

 

<div><!--@Include(../Includes/Footer.html)--></div>

 

i've tried to make a document.write with the include tag inside but it returns );

 

<script type="text/javascript">
document.write("<!--@Include(../Includes/Footer.html)-->")
</script>

 

any ideas?


Replies

 
Reply

The Dynamicweb template tags run server side, and JavaScript runs client side, so there's no interaction between the two. I don't know the purpose of your implementation, but would you be able to use an XSLT template and get the desired result?

 
Reply
Sorensen wrote:

The Dynamicweb template tags run server side, and JavaScript runs client side, so there's no interaction between the two. I don't know the purpose of your implementation, but would you be able to use an XSLT template and get the desired result?


 

Hi

 

what i need to do is to load differnt html files with banner tags into the template "page" to depending of witch stylesheet the page has loaded.

 

right now i uses a global var from the stylesheet to give me the name of current template and after that i use js to show the banners.

 
Reply

Oh, ok. I don't think there's a pretty way of doing his unless you code a small module for it. Is it complete change of all the HTML, or is it just the image pathe and perhaps link?

 

You must be logged in to post in the forum