Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Help with Article / Category / Section Implementation
Here’s the site I’m trying to rebuild in TextPattern:
http://centerfest.durhamarts.org/performances.html
Some thoughts:- I’d like each ‘act / performer’ to be an article
- I can set their show time in a custom field
- I can set their ‘day’ and ‘stage’ in a category
The real question is i’d want to sort it like the page above…
Day 1
-Stage 1
—Time 1
—Time 2
—Time 3
-Stage 2
—Time 1
—Time 2
—Time 3
-Stage 3
—Time 1
—Time 2
—Time 3
Day 2
-Stage 1
—Time 1
—Time 2
—Time 3
-Stage 2
—Time 1
—Time 2
—Time 3
-Stage 3
—Time 1
—Time 2
—Time 3
- Forget the anchor tags, I’ll just have the performer links open up the individual article’s page
THANKS FOR YOUR HELP
Offline
Re: Help with Article / Category / Section Implementation
- Section: You only need one section
- For multiple events you can use multiple sections of course
- Publish: Each ‘act / performer’ as an article plus the necessary field contents
- Navigation: Link to txp:category1 name=“day n”
- You site navigation can simply link to single articles
- Stages: Show article list differentiated by txp:if_different.
- Showtime: Sort txp:article list by custom field ‘showtime’ eg sort=“custom_1”. Only show article title (performer) and wrap in txp:permlink to full article.
Read more in the Textpattern tag reference
PS: You can recycle your whole content by copying the existing HTML into the article. But take care to turn off textile for those articles!
PPS: You can even simply keep the old navigation links and the HTML pages.
Last edited by merz1 (2010-08-05 00:04:03)
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
Re: Help with Article / Category / Section Implementation
brilliant. thanks so much. if i’d known about (or read about) if_different before, i’d have saved myself a TON of time.
THANKS!
Offline
Re: Help with Article / Category / Section Implementation
OK. Fine. Let’s hear about how you did the details when your page works properly.
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
Re: Help with Article / Category / Section Implementation
Sure. I ended up using this form for articles in the ‘performances’ section:
<txp:if_different><h2><txp:custom_field name="Performance_Day" /></h2></txp:if_different>
<txp:if_different><h3><txp:category1 title="1" /></h3></txp:if_different>
<li><txp:posted format="%l:%M %p" /> - <txp:permlink><txp:title /></txp:permlink></li>
i used the posted time as the show time so I could parse and sort it correctly and get 1PM rather than 13PM, which is what I would have needed to do if I put time in a custom field (i think)
here’s the article tag in the section:
<txp:article_custom sort="custom_6 ASC, Category1 ASC, Posted ASC" form="performances" section="performances" />
so it first sorts by day (custom_6), then by stage name (category1), and then by posted time. and i end up with this
which is exactly what i wanted.
thanks again for your help.
Offline
Re: Help with Article / Category / Section Implementation
OK. It’s late already but I see:
- Missing
<ul>...</ul>
wrapping. Seeing your design I am not even sure if you need an unordered list format. - CSS: Use a CSS table eg
class="class name"
for proper formatting oftxp:posted
My very fast proposal for a page template using your code (no form used) and trying to implement a proper unordered list:
(Edited the code twice but I am still unsure/confused about the ul/li
logic in combination with txp:if_different
)
<txp:article_custom sort="custom_6 ASC, Category1 ASC, Posted ASC" wraptag="ul" break="li" section="performances">
<txp:if_different><h2><txp:custom_field name="Performance_Day" /></h2></txp:if_different>
<txp:if_different><txp:category1 title="1" wraptag="h3" /></txp:if_different>
<txp:posted format="%l:%M %p" class="CSS class name" /> - <txp:permlink><txp:title /></txp:permlink>
</txp:article_custom>
- Note: Use attributes like
wraptag="ul" break="li"
where available. - PS: Loads of
in your HTML.
Last edited by merz1 (2010-08-05 22:32:25)
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
Re: Help with Article / Category / Section Implementation
thanks! i’ll definitely take that advice and clean up / simplify my implementation.
any advice on this one? http://forum.textpattern.com/viewtopic.php?id=34362
Offline
Re: Help with Article / Category / Section Implementation
Advice: Welcome to the world of tagging
Last edited by merz1 (2010-08-07 13:24:53)
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline