Copied to clipboard

Flag this post as spam?

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


  • Gordon Saxby 1461 posts 1883 karma points
    Feb 11, 2009 @ 13:56
    Gordon Saxby
    0

    Selecting unique first letters of nodes

    I have a list of categories under one folder (node) and I need to extract all the unique first letters - i.e. make a (almost) A - Z list. I have the following XSLT which gives me the first letter, but I can't get it to just show a unique list of letters

    [code]






  • [/code]

    For example, there are nodes called "Accounts", "Architects" and "Arts Centre" ... I need to output one "A" for all of those. Currently, I'm getting 3 "A"s. Obviously, there are then categories starting with "B", "C", etc.

    Eventually, I will want to list each category under the correct letter ... but one step at a time!!

Copy Link
  • Gordon Saxby 1461 posts 1883 karma points
    Feb 11, 2009 @ 14:08
    Gordon Saxby
    0

    These categories are for grouping members of the web site, whose information is to be shown.

    I've just had a thought / realised? I was going to create member records as documents and use XSLT to sort / select / etc. However, the members also need to be able to logon to the site ... do they HAVE to be entered into the Members section to enable that?

    If so, could I (should I?!) create a member Type with fields for all of their details and then access this info via a macro / XSLT? Otherwise, (some of) the info will need to be entered twice.

    Copy Link
  • Gordon Saxby 1461 posts 1883 karma points
    Feb 11, 2009 @ 17:03
    Gordon Saxby
    0

    After searching the forum, it appears as though it's not possible to read the Members section with XSLT - so I'm back to the first option (if I ever left it?).

    Anyone have any ideas on how I can remove duplicate letters? I tried altering the for-each statement to use substring but it complains :-(

    Copy Link
  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Feb 11, 2009 @ 17:46
    Dirk De Grave
    0

    Hi Gordon,

    Haven't done this yet myself, but I'm pretty sure

    Copy Link
  • Please Sign in or register to post replies

    Write your reply to:

    Draft