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!!
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.
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 :-(
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!!
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.
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 :-(
Hi Gordon,
Haven't done this yet myself, but I'm pretty sure
is working on a reply...