Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: On section/article-list page: How to list keywords of all articles
Gocom wrote:
That is what you want too… with the ID request, right?
The idea of an id
attribute was to have a way to make it easier to generate the proper meta on article_list context (section, category).
So, to do something like this:
<txp:if_article_list>
<txp:article_custom id="123">
<txp:rah_metas id='<txp:article_id />' />
</txp:article_custom>
<txp:else />
<txp:rah_metas />
</txp:if_article_list>
Now, a more “general” version, that would work across sections, pulling/generating the meta from the latest sticky article on the section:
<txp:if_article_list>
<txp:article_custom status="sticky" limit="1">
<txp:rah_metas id='<txp:article_id />' />
</txp:article_custom>
<txp:else />
<txp:rah_metas />
</txp:if_article_list>
It’s a common practice to have an sticky article for sections like “About us”, “Contact” or even, to have one sticky article as an intro article for sections or categories (that could also have a bunch of live articles).
Currently, there isn’t an easy way, afaik, to create meta stuff for article lists, without using a bunch of if_section/if_article_list/if_blahblah
.
Or, to say it as a question: how would you generate proper/unique meta stuff on article_list contexts (like section/category frontpage) without relying on nested-conditionals and/or a bunch of variables, or without relying on rah_metas default values?
Offline
Re: On section/article-list page: How to list keywords of all articles
To pass memory restrictions you can use aks_cache and “save” keywords list for some time.
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: On section/article-list page: How to list keywords of all articles
The basic idea behind rah_metas, in 2007, was that it works for individual articles, cuts tag mess a bit, and shortens description and keywords, but that’s about it. It really does nothing more in it’s current state. I could add the id
attribute but the plugin could be much more useful without the single tag nature.
maniqui wrote:
The idea of an id attribute was to have a way to make it easier to generate the proper meta on article_list context (section, category).
I know. :-) It wasn’t really a literal question, thank for answering tho :-). I’m just wondering where I should go with rah_metas. It isn’t exactly the prince charles riding white horse. Atleast I do need to rewrite the code and it could be so much better.
Or, to say it as a question: how would you generate proper/unique meta stuff on article_list contexts (like section/category frontpage) without relying on nested-conditionals and/or a bunch of variables, or without relying on rah_metas default values?
How would I do it? Like personally? Without rah_metas? Either:
<txp:output_form form='description_<txp:section />' />
<txp:output_form form='keywords_<txp:section />' />
Or if I wanted to store everything inside sticky articles:
<txp:article_custom status="5" section='<txp:section />' category='<txp:category />' limit="1">
<txp:keywords />
<txp:custom_field name="description" />
</txp:article_custom>
Last edited by Gocom (2010-05-14 16:57:12)
Offline