Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
include separate custom article lists
I’m certain that I saw the “how to” in this forum some time ago but I just can’t seem to find it.
I am trying to create a number of pages which will show a list of entries based on keywords basically using <txp:article_custom sort="Posted desc" keywords="One" />
The problem is that I cannot figure out where to include it in the code bellow. At the moment the code detects search, section, category and individual article pages but how can I add other pages for custom lists which could be in the form of
<txp:article_custom sort="Posted desc" keywords="experimental" />
<txp:article_custom sort="Posted desc" keywords="narrative" />
<txp:article_custom sort="Posted desc" keywords="generative" />
etc.
Here’s the stripped down code to date
<txp:if_search>
<txp:hide>search results</txp:hide>
<txp:else />
<txp:if_article_list>
<txp:hide>article list page, either section or category</txp:hide>
<txp:variable name="categoryname" value='<txp:page_url type="c" />' />
<txp:hide>detect if you are in a category page</txp:hide>
<txp:if_variable name="categoryname" value="">
<txp:hide>lists artwork 'type' categories. ie video, interractive, mixed media, installations etc</txp:hide>
<txp:category_list parent="artworks" exclude="artworks" sort="name" section="artworks" wraptag="p" break=", ">
<txp:category title="1" link="1" />
</txp:category_list>
<txp:else />
<txp:hide>category page </txp:hide>
<txp:article_custom section="artworks" category='<txp:category />' />
</txp:if_variable>
<txp:else />
<txp:hide>individual article page</txp:hide>
<txp:article />
</txp:if_article_list>
</txp:if_search>
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: include separate custom article lists
Yiannis, could you repeat the question? :) Your tree seems exhaustive, where would you like additional pages go?
Offline
Re: include separate custom article lists
Hi Oleg,
Maybe it is confusing.
I am using
search > obvious
section home page > to list artworks by type (displays a categories listing here)
category pages > lists artworks under the “type” categories
individual pages > one individual page/artwork
Now I would also like to create list views of artworks by genre. As some of them use more than one, I thought that using article_custom
& keywords
would do that. The problem is that I don’t know how to insert those options in the tree of the particular section/template.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: include separate custom article lists
Adding that one way might be to include the genre option in the individual article something like
...
<txp:hide>individual article page</txp:hide>
<txp:article />
<txp:keywords />
//but I would like each one of those to link to a custom page
which will list all articles having at least one of those keywords.
</txp:if_article_list>
</txp:if_search>
The problem is that even if I manage the above I don’t know if the above tree can display it.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: include separate custom article lists
You mean something like that?
<txp:rah_repeat value='<txp:keywords />' wraptag="ul" break="li">
<a href='your_custom_page&keyword=<txp:rah_repeat_value />'><txp:rah_repeat_value /></a>
</txp:rah_repeat>
On your_custom_page
you can retrieve keyword
from url (adi_gps
?) and display
<txp:article_custom sort="Posted desc" keywords='<txp:variable name="keyword" />' />
Offline
Re: include separate custom article lists
Maybe tru_tags would do it.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Pages: 1