Customize Checkbox list using xslt or other language?
Hi I would like to create a user control that automatically generate a checkbox list datatype accordingly to the nodes displayed on some xslt. Would that be possible to do? How?
Mind leaving me with a step by step tutorial, thanks
not 100% I understand you correctly. Do you want to output a checkbox list on your web site based on some content nodes (each cotent node will beone checkbox) using XSLT?
Or it would be done using some other scripts, like #C perhaps? And how would you implement that so it would create such output.
So here is the case:
A client asked me to create a system where they could actually create a side navigation that they could edit on every page.
So basically what I wanted to do is to create a non-hardcoded checklist for the client so that he could pick up nodes/ links and they would appear differently on every page, if that makes sense. Well, it would be far easier to do it using richtext, but I just wanted to know if this other option is available. Orrr, is there another better way for this?
It will be possible using the Ultimate Picker - Checkboxlist data type, yet that will be a pain to handle from the content.
The best solution here I guess is the Multi Node Tree Picker which is part of the uComponents package. Put this on every page whcih will have a side navigation and your client will be able to hand pick the items he wants to display there. That will be a lot of work though as you need to do that for every single page. So perhaps think about some default selection which will be recursively called upon when the user doesn't make a selection. Alternatively you could build up side menu items outside of the content tree (every side menu will basically have a multi node tree picker on it) and reference the appropriate one on a content page, which means you can re-use these items. To display the menu on the web site you can use pretty much any available technology you like, I personally like to build this using Xslt, but a .Net control, Python script or Razor markup will do fine as well.
Another alternative to approach this is to have the information on the pages itself, e.g. each page gets a tickbox 'displayInSideMenu'. When you go to a page on the web site all items in that category will be displayed which have 'displayInSideMenu' set to true. If you wanted to you could still place a multi node tree picker on each page for the user to override the automated menu.
As Sascha suggests the MultiNode TreePicker sounds like it'll work really well for what you want, but if the navigation structure isn't that deep, or you'd prefer the simplier UI of checkboxes then you could also consider the XPath CheckBoxList datatype also in uComponents. Both datatypes can store XML fragments, and can be configured with XPath expressions that allow the use of $currentPage and $parentPage (if current unpublished), so the list of options availble to be picked can be relateed to the current page.
Customize Checkbox list using xslt or other language?
Hi I would like to create a user control that automatically generate a checkbox list datatype accordingly to the nodes displayed on some xslt. Would that be possible to do? How?
Mind leaving me with a step by step tutorial, thanks
Hi,
not 100% I understand you correctly. Do you want to output a checkbox list on your web site based on some content nodes (each cotent node will beone checkbox) using XSLT?
Cheers,
Sascha
Yeah, would that be possible?
Or it would be done using some other scripts, like #C perhaps? And how would you implement that so it would create such output.
So here is the case:
A client asked me to create a system where they could actually create a side navigation that they could edit on every page.
So basically what I wanted to do is to create a non-hardcoded checklist for the client so that he could pick up nodes/ links and they would appear differently on every page, if that makes sense. Well, it would be far easier to do it using richtext, but I just wanted to know if this other option is available. Orrr, is there another better way for this?
Thanks
It will be possible using the Ultimate Picker - Checkboxlist data type, yet that will be a pain to handle from the content.
The best solution here I guess is the Multi Node Tree Picker which is part of the uComponents package. Put this on every page whcih will have a side navigation and your client will be able to hand pick the items he wants to display there. That will be a lot of work though as you need to do that for every single page. So perhaps think about some default selection which will be recursively called upon when the user doesn't make a selection. Alternatively you could build up side menu items outside of the content tree (every side menu will basically have a multi node tree picker on it) and reference the appropriate one on a content page, which means you can re-use these items. To display the menu on the web site you can use pretty much any available technology you like, I personally like to build this using Xslt, but a .Net control, Python script or Razor markup will do fine as well.
Another alternative to approach this is to have the information on the pages itself, e.g. each page gets a tickbox 'displayInSideMenu'. When you go to a page on the web site all items in that category will be displayed which have 'displayInSideMenu' set to true. If you wanted to you could still place a multi node tree picker on each page for the user to override the automated menu.
Hope that gives you enough to crack on!
Sascha
Thanks for the answer Sascha, I'll try it out
Hi D-au,
As Sascha suggests the MultiNode TreePicker sounds like it'll work really well for what you want, but if the navigation structure isn't that deep, or you'd prefer the simplier UI of checkboxes then you could also consider the XPath CheckBoxList datatype also in uComponents. Both datatypes can store XML fragments, and can be configured with XPath expressions that allow the use of $currentPage and $parentPage (if current unpublished), so the list of options availble to be picked can be relateed to the current page.
HTH,
Hendy
is working on a reply...