Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
archives of a section
I am having problems figuring out the best way to accomplish something. On a site that I am helping with, there is a page called S.o.S. (Sand or Seaweed). It is a page of recommendations, both good (sunset) and bad (seaweed). These recommendations don’t show up on the front page (by design). To see them, you click on the S.o.S. link on the front page. That link takes you to /recommend/ and it displays a sticky article with a quick explanation of what the page is and then the two most recent recommendations. What I need now is to create a link to list the old recommendations. Ideally, I would like to have the link point to some page that lists the susets and seaweeds separately.
So here is how I have it set up right now. The “recommend” section uses the “default” page. On the default page, I have:
bc..<txp:if_section name=“recommend”>
<txp:article status=“sticky” />
<txp:article limit=“2” />
<txp:else />
<txp:article limit=“1” />
</txp:if_section>
With what I’m doing, I’m stuck without a way of displaying the archve of recommendations. There has got to be a way to do this, but I think I’m missing something fundamental here. If anyone has any ideas on how I can better set this up, they would be much appreciated. Please let me know if I’m not making any sense.
Offline
Re: archives of a section
Are “sunset” and “seaweed” categories in the “recommend” section?
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: archives of a section
> thebombsite wrote:
> Are “sunset” and “seaweed” categories in the “recommend” section?
Yes. I knew I had missed explaining something.
Offline
Re: archives of a section
If you installed the glx_if plug-in you could do something like this:-
<code>
<txp:glx_if_category_list>
<txp:if_category name=“seaweed”>
<txp:article_custom section=“recommend category=“seaweed” form=“FormName” offset=“1” limit=“5” />
</txp:if_category>
<txp:if_category name=“sunset”>
<txp:article_custom section=“recommend category=“sunset” form=“FormName” offset=“1” limit=“5” />
</txp:if_category>
<txp:else />
<txp:if_section name=“recommend”>
<txp:article status=“sticky” />
<txp:article limit=“2” />
<txp:else />
<txp:article limit=“1” />
</txp:if_section>
</txp:glx_if_category_list></code>
<br />
Now I haven’t tried that myself but it should work provided that the category name is part of the page URL so you need to ensure that it is included in your link URL. Also I’m not sure if the second half, your normal front-page, will also appear as it is in the same section. I don’t think it will as it is not a category list but if it does then replace my “else” with the closing “glx_if_category_list” tag and surround that second half with the “glx_if_section_frontpage” tags. Otherwise just YELL. ;) Oh, and I’ve included “offset” incase you want to avoid seeing the latest article again. If you don’t want it you can remove it with complete safety.
Last edited by thebombsite (2005-10-07 23:27:54)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Pages: 1