Need something like an #include in my main template
I have different sections of my website that all share the same basic layout.
But each section also has one part of the page that will be different, to navigate that section only. It's a sub menu area for that particular section.
How can I put that piece in my main template? I'm wanting to use something like an #include for that sub-navigation piece. I will just be a static div.
One master template that has the main structure, with a content place holder where your sub menu will go. Then a template that is a child of the master for each custom section.
Need something like an #include in my main template
I have different sections of my website that all share the same basic layout.
But each section also has one part of the page that will be different, to navigate that section only. It's a sub menu area for that particular section.
How can I put that piece in my main template? I'm wanting to use something like an #include for that sub-navigation piece. I will just be a static div.
PS - I'm hoping to find a simpler solution than a user control. Just including HTML somehow would be ideal.
Couldn't you just use nested master templates?
One master template that has the main structure, with a content place holder where your sub menu will go. Then a template that is a child of the master for each custom section.
Or you could create an XLST macro that could read the current section and display the content base on that
Hi Tesuji, maybe I'm not understanding you correctly, but it sounds to me as if you'd like to use content-placeholders in your mastertemplates?
If thats the case you add something like this to your master template:
and then in your child template of the main template you add content to the placeholder, e.g. using
>Tommy
Thanks for the responses. I'll check into these.
The main template is actually already a child template. I guess I could put the submenu in a "grandchild" template?
Can you have two contentplaceholders in a template? It already has one.
You can have multiple placeholders, yes - just make sure to use unique ID's
>Tommy
is working on a reply...