I followed Hendy's blog article (Sidebar widgets with Umbraco V4) and am suffering problems on rendering the widgets. Can anyone who did it give a help please?
As following the article, the Sidebar Widgets is a DocType folder in every content page using a data type of ultimate picker to include a checkbox list (e.g. widget 1, widget 2). I am using a user control macro with a string parameter 'Widgets'. The control has an asp:Repeater control for the rendering. But I don't quite understand the line below on what recursive value should be in the Widgets property.
Thanks for the hint! Rich. I can understand how the recursive thing works in umbraco now.
I was struggled on which value should put after $ notation. I tried various values from macro name to content node id but none of them works. Actually it should be the alias of the ultimate picker defined in the docType. I am still learning umbraco and hope to get more ideas from here.
Sidebar widgets rendering problems (v4.7)
I followed Hendy's blog article (Sidebar widgets with Umbraco V4) and am suffering problems on rendering the widgets. Can anyone who did it give a help please?
My content tree shows below:
- Home
-- Page 1
-- Page 2
-- Sidebar Widgets
--- widget 1
--- widget 2
..........
As following the article, the Sidebar Widgets is a DocType folder in every content page using a data type of ultimate picker to include a checkbox list (e.g. widget 1, widget 2). I am using a user control macro with a string parameter 'Widgets'. The control has an asp:Repeater control for the rendering. But I don't quite understand the line below on what recursive value should be in the Widgets property.
<umbraco:Macro Alias="sidebarWidgets" Widgets="[$sidebarWidgets]" runat="server"/>
Is $sidebarWidgets just the alias of the user control or the NodeID of the folder or something else?
I might not express myself well. Thanks
Hi,
The $ notation tells umbraco to look up the tree until it finds a value for the property you're looking for.
So [$sidebarWidgets] means that umbraco will go up the tree and look for the first sidebarWidgets property that is not empty.
Rich
Thanks for the hint! Rich. I can understand how the recursive thing works in umbraco now.
I was struggled on which value should put after $ notation. I tried various values from macro name to content node id but none of them works. Actually it should be the alias of the ultimate picker defined in the docType. I am still learning umbraco and hope to get more ideas from here.
is working on a reply...