I'm speccing up a new project and I'm trying to think of the best way to accomplish something, any advice or input greatly appreciated!
Basically the site will have a right hand column that can contain any combination of information of information boxes, which can be assigned on a per page basis (but I'm going to have it filter up the content tree, so if no boxes are assigned to a page, it'll recurse up the tree until it finds a page with some boxes assigned).
The way I'm currently thinking of doing this is to have two root nodes, one for the actual site content, and one for the boxes themselves. This would alow the cms users to create new boxes, and I can then use a customised version of the rleated content control to allow them to link the pages in the site to one or more boxes and order them as they wish. So the site structure would be something like:
Homepage (actual site root, domain points here)
-- Section 1
---- Page 1
---- Page 2
--Section 2
Settings (dummy node for any settings nodes that I may have)
-- Boxes
---- Box 1
---- Box 2
---- Box 3
Can anyone see any problems with this way of doing it, or think of a better way of doing it?
Thats how I tend to do it. Though I usualy create a Misc folder at the root, and then have the "Boxes" folder within that. (Just in case I create other content in a similar way).
Depending on the project, I'll either use a multi picker, or just create a predifned number of regular content pickers to allow the user to select the relevant box content. I then have a macro that loops through the nodes, checks their type and renders their content accordingly.
Another tip, if you use a master doc type, you can define a "Boxes" tab with whatever way you decide to pick the nodes on it, and have all your main doc types use this and they will automatically have the "Boxes" tab ready.
Thoughts and opinions on best way to do something
Hi,
I'm speccing up a new project and I'm trying to think of the best way to accomplish something, any advice or input greatly appreciated!
Basically the site will have a right hand column that can contain any combination of information of information boxes, which can be assigned on a per page basis (but I'm going to have it filter up the content tree, so if no boxes are assigned to a page, it'll recurse up the tree until it finds a page with some boxes assigned).
The way I'm currently thinking of doing this is to have two root nodes, one for the actual site content, and one for the boxes themselves. This would alow the cms users to create new boxes, and I can then use a customised version of the rleated content control to allow them to link the pages in the site to one or more boxes and order them as they wish. So the site structure would be something like:
Homepage (actual site root, domain points here)
-- Section 1
---- Page 1
---- Page 2
--Section 2
Settings (dummy node for any settings nodes that I may have)
-- Boxes
---- Box 1
---- Box 2
---- Box 3
Can anyone see any problems with this way of doing it, or think of a better way of doing it?
Hey Tim,
Thats how I tend to do it. Though I usualy create a Misc folder at the root, and then have the "Boxes" folder within that. (Just in case I create other content in a similar way).
Depending on the project, I'll either use a multi picker, or just create a predifned number of regular content pickers to allow the user to select the relevant box content. I then have a macro that loops through the nodes, checks their type and renders their content accordingly.
For the recursive thing, I tend to just pass in the node ID(s) to the macro so i can use the umbraco syntax [$propertyName] to do the recursion for me (More details here http://umbraco.org/documentation/books/macro-parameters-syntax/advanced-parameter-syntax)
Many thanks
Matt
Another tip, if you use a master doc type, you can define a "Boxes" tab with whatever way you decide to pick the nodes on it, and have all your main doc types use this and they will automatically have the "Boxes" tab ready.
Excellent, glad I'm thinking along the same lines as others! Found this rather awesome blog post earlier too: http://blog.hendyracher.co.uk/sidebar-widgets-with-umbraco-v4/#content
Cool, nice find.
Matt
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.