asp include statement
Good day,
We have just started using Sitefinity and was wondering if you can actually do an #include statement in the html code? I have tried it with no success. I may be going about this backwards as is there a widget or some way of mimicking the include statement with Sitefinity?
Thanks,
Rob
Hello Rob,
Could you please be more specific on where are you trying to add the "#include" statement and for what purpose?
Kind regards,
Veronica Milcheva
the Telerik team
Hi Veronica,
What I was trying to do was add an include statement , <!-- #include virtual= "xxx/test.html"-->, in page edit mode source view. One purpose is that on that include page it has a navigation menu. I thought of doing a template but then each page the include would be on are completely different in layout/design so template would not work. Because of the number of pages adding the navigation into each page would be a bit of a pain instead of adding the one include statement line. Have not used and CMS in the past so still getting use to it and may not just know another route to take instead of an include statement.
Thanks for your help and any suggestions.
Rob
Hello Rob,
As I understand the purpose of the <! -- #include --> statement - you use it to add a menu to all your pages. Well in that case why don't you use a Master Page?
All the best,
Veronica Milcheva
the Telerik team
Hi Veronica,
I had used master page in Visual Studio 2010 but since the master is one design layout much like using a template, I would have to create several master/template pages. I could maybe use one master for 5 pages but the remainder of the pages that require the include are a different layout so a different master would have to be created. The menu will be at the top on some pages, on the side on some and even some pages just plain text in the footer so it is not consistently in one spot. I was just trying to avoid making up several templates or master pages and instead just use the include statement in the location it is required for that particular page. Hopefully that makes sense on what I am trying to do. In the end I may have to create several templates - correct?
Thanks - Rob
Hello Rob,
Yes, in my opinion the best way up to now is to create several templates according to your needs.
Regards,
Veronica Milcheva
the Telerik team