Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • D-au 26 posts 76 karma points
    Feb 28, 2011 @ 02:34
    D-au
    0

    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

  • Sascha Wolter 615 posts 1101 karma points
    Feb 28, 2011 @ 06:03
    Sascha Wolter
    0

    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

  • D-au 26 posts 76 karma points
    Feb 28, 2011 @ 23:48
    D-au
    0

    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

     

  • Sascha Wolter 615 posts 1101 karma points
    Mar 01, 2011 @ 01:42
    Sascha Wolter
    0

    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

  • D-au 26 posts 76 karma points
    Mar 03, 2011 @ 07:53
    D-au
    0

    Thanks for the answer Sascha, I'll try it out

  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Mar 03, 2011 @ 08:07
    Hendy Racher
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft