Building a UL list, from node names is pretty easy, (however I believe the nodeName should only be used to create the URL, not the visable page title)... Listing all the sections names again pretty easy, and listing all the sub section news items no worries.
However what is more difficult is creating something like this.
News
--- Section A [alias=sectionTitle]
- - - - - - All Item A
- - - - - - All Item B
- - - - - - All Item C
--- Section B [alias=sectionTitle]
- - - - - - All Item A
- - - - - - All Item B
- - - - - - All Item C
-
Clearly this is an issue with the for:each, just trying to work out a good way to deal with this issue... as its something which is likely to be used again, and again.
Okay, so maybe just writing that post fixed my thought process...
10 minutes later, I've got this code...
[code]
[/code]
Basically....
Selects Nodes, which are NOT hidden.
Then prints each nodes name (in this case they are countries, so 'mapName')
Then we select the children (node)
Pull the data needed
Close both for-each tags.
-
Nice!! As usual, what I had before was hugely more complex, what I needed to do was start from scratch, and get back to basics! ;) L
Listing Multiple News Sections (many parents) [SOLVED]
I'm working on a news section at the moment, it looks something like this...
News
---- Section A
- - - - - Item A1
- - - - - Item A2
- - - - - Item A3
---- Section B
- - - - - Item B1
- - - - - Item B2
---- Section C
(etc)
Building a UL list, from node names is pretty easy, (however I believe the nodeName should only be used to create the URL, not the visable page title)... Listing all the sections names again pretty easy, and listing all the sub section news items no worries.
However what is more difficult is creating something like this.
News
--- Section A [alias=sectionTitle]
- - - - - - Item A1 [alias=bodyTitle] [alias="bodyTeaser"]
(etc)
I tend to end up getting something like
News
--- Section A [alias=sectionTitle]
- - - - - - All Item A
- - - - - - All Item B
- - - - - - All Item C
--- Section B [alias=sectionTitle]
- - - - - - All Item A
- - - - - - All Item B
- - - - - - All Item C
-
Clearly this is an issue with the for:each, just trying to work out a good way to deal with this issue... as its something which is likely to be used again, and again.
Okay, so maybe just writing that post fixed my thought process...
10 minutes later, I've got this code...
[code]
[/code]
Basically....
Selects Nodes, which are NOT hidden.
Then prints each nodes name (in this case they are countries, so 'mapName')
Then we select the children (node)
Pull the data needed
Close both for-each tags.
-
Nice!! As usual, what I had before was hugely more complex, what I needed to do was start from scratch, and get back to basics! ;) L
is working on a reply...