Unfortunately since the fallback values are comma-separated, you can't add a value that contains commas! :-$ So the best option would be to have a property on your DocType that contains the default node IDs.
I use this macro to display widgets, if no widgets are added to the current page they are inherited from a parent node. This way all sections can have a default list of widgets which you can override:
I have a similar situation, but the solution above doesnt quite work for me. I kind of want [#leftContentWidgets] but not on the current page. I think the example above either looks at fields on the current page or hard coded node id's.
Is there a way to point the nodeid's to a field on another node "settings node for instance"?
Default node IDs for RenderTemplate control
I'm using the RenderTemplate control to output widgets on a page, small panels of content that should appear on the left column of pages.
At the moment I have the following code to pull the widget information from the page (the macro uses the uComponents RenderTemplate control).
I'd like to be able to have a default list of widget Node IDs however, set in a Settings page. Is it possible with this macro.
Hi Suzy,
Sure thing. With the "NodeIds" attribute you can comma-separate additional values, like so:
Unfortunately since the fallback values are comma-separated, you can't add a value that contains commas! :-$ So the best option would be to have a property on your DocType that contains the default node IDs.
Good luck!
Cheers, Lee.
Hi Suzy,
I use this macro to display widgets, if no widgets are added to the current page they are inherited from a parent node. This way all sections can have a default list of widgets which you can override:
<umbraco:Macro runat="server" Alias="RenderWidget" NodeIds="[$sideWidgets]" CurrentPage="1" EntriesPerPage="10" AltTemplateId="0" UseChildNodes="0" />
Hi All,
I have a similar situation, but the solution above doesnt quite work for me. I kind of want [#leftContentWidgets] but not on the current page. I think the example above either looks at fields on the current page or hard coded node id's.
Is there a way to point the nodeid's to a field on another node "settings node for instance"?
is working on a reply...