Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2007-01-21 15:29:33
- ultramega
- Member
- Registered: 2006-02-26
- Posts: 221
If, else and so on
I have a band site with “Music”-section in the “root level” of the site. It lists albums and their songs. When user clicks a song name, we move to the “Lyrics”-section. Lyrics for the song is displayed. In the sidebar we list songs for that album, to make it possible to change lyrics.
Solution I use now is:
Each albums’ lyrics are saved in their own sections. In the sidebar we list song titles (all articles from that section, if being literal). Clicking titles shows lyrics for them. But having many sections for this kind simple purpose feels very stupid.
How could I make this with having one lyrics-section only?
- User comes from the Music-section after clicking song A from album XYZ. We have lyrics for the song, and sidebar lists songs from album XYZ.
- User comes from the Music-section after clicking song C from album FOO. We have lyrics for the song, and sidebar lists songs from album FOO.
I’m sure there is some if/else solution, possible with categories/custom fields, but it goes behind my understanding.
I can live with this existing multi-section solution (there is not 20 albums, yet…). But if the clever way to do this can be explained without too much pain, I’d like to hear it.
Offline
#2 2007-01-22 20:44:25
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: If, else and so on
Each albums’ lyrics are saved in their own sections… How could I make this with having one lyrics-section only?
Off the top of my head: section (music), category (artist), category (album), article (song). You could make each album a sub-category of the artist category (for ease of viewing/adding in the admin panel). Make use of the various conditional tags (see TextBook).
Offline
Pages: 1