Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Can a txp tag be the attribute value for another txp tag?
Looking at using TextPattern for a music site.
For each band, I want to have a profile page that lists all other content on the site for that band:
- album reviews
- albums (discography)
- band news
- band histories
- band interviews
- band photos
The above items are my categories.
Because I will easily have thousands of bands, I can’t add the band name as a category. (E.g. Have a category named Beatles thta I use for all Beatles content.)
What I’d like to do is create a profile page for each band. This would be an article and have an article ID.
Then, I’d like to generate a list of all album reviews (a category) where a custom field contains the current article id.
Can I nest the article id tag inside the article or article_custom tag? Can I do this?
<txp:article customfieldname="<txp:article_id />" />
Or do I need to create a custom tag?
(Edit: updated code to display properly. :) -Mary)
Last edited by Mary (2006-05-06 19:20:49)
Offline
#2 2006-05-06 17:12:02
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Can a txp tag be the attribute value for another txp tag?
If I understand you correctly, no, you can’t do that. You can’t have txp tags inside other txp tags. But have a look at chh_related_articles.
Offline
Re: Can a txp tag be the attribute value for another txp tag?
I’ll check this out. Mary also offered some code in response to another post today that exposes a way to customize queries.
I think my biggest hurdle is to try and figure out the best way to track the ids for all of the bands. This looks really good though. I could specify a category and then a custom field with the id assigned to the artist.
Thanks!
Offline
Re: Can a txp tag be the attribute value for another txp tag?
tags-in-tags, a wanna-be FAQ.
Offline