How does the info used in master template as umbraco items get passed down to child templates?
Master template Child template 1 Child template 2
In Master template I have
<umbraco:Item field="training" runat="server" />
The field "training" is text that is entered in umbraco's content tab. This info needs to be entered once and displayed in page placeholders that use Child template 1 and 2.
It is because I have a static menu on the left of all pages for which the information remains the same no matter what page you are on. So it made sense to use "<umbraco:Itemfield="training"recursive="true"runat="server"/>" on the master template thinking the information will be passed down to the slave templates, but apparently this is not how umbraco works hence me being stuck.
(Have only skimmed this post so sorry if I'm suggesting something that has already been said - but seems people have been focusing on umbraco:Item stuff)
I suppose you have made a XSLT macro to render you menu?
Then you need to add the macro to your template in order to have the menu rendered and make sure it acts dynamically. If you have doubt about how to create the XSLT macro etc. I got a feeling Chriztian might have a trick or two to show you :)
How to pass down info to all pages
How does the info used in master template as umbraco items get passed down to child templates?
In Master template I have
The field "training" is text that is entered in umbraco's content tab. This info needs to be entered once and displayed in page placeholders that use Child template 1 and 2.
Hi Seena
Have you tried
Yes. That does not work.
Hi, What are you trying to do? In order to pass information between Master pages you need to do this
For instance i have a master template called HTML
<head>
</head>
<body>
<asp:ContentPlaceHolder id="Home" runat="server">
</asp:ContentPlaceHolder>
</body>
In the child templates below this i have a master template called Home i have
<asp:content ContentPlaceHolderId="Home" runat="server">
<umbraco:Macro Alias="Home" runat="server"></umbraco:Macro>
</asp:content>
That will get some inheritance going? Any problems give me a shout :). Hope this helps. Charlie :)
Charles,
The user information is accessed and displayed in master. I just need the child templates to show the same information as the master.
Hi Seena,
If you don't add the <asp:content> tags for the placeholders defined in the Master, the Master's content in them will display on the child templates.
/Chriztian
Chriztian,
I already dont. Could you give an example?
Hi Seena,
Sorry for my late reply. Why do you need the child pages to show the same information as the master page? Thanks. Charles.
Charles,
It is because I have a static menu on the left of all pages for which the information remains the same no matter what page you are on. So it made sense to use "<umbraco:Itemfield="training"recursive="true"runat="server"/>" on the master template thinking the information will be passed down to the slave templates, but apparently this is not how umbraco works hence me being stuck.
Hi Seena
(Have only skimmed this post so sorry if I'm suggesting something that has already been said - but seems people have been focusing on umbraco:Item stuff)
I suppose you have made a XSLT macro to render you menu?
Then you need to add the macro to your template in order to have the menu rendered and make sure it acts dynamically. If you have doubt about how to create the XSLT macro etc. I got a feeling Chriztian might have a trick or two to show you :)
/Jan
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.