Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Article category list with images
You should go first with a direct sql query, with smd_query, obtaining a three “most popular” category list, then extract from this list the first 3 categories with etc_query, that you plug into <txp:categoy_list /> and last use Els snippet.
giampablo wrote #285092:
And can you tell me how to “plug into <txp:category_list />”?
<txp:category_list
categories='<txp:smd_query query="SELECT Category1 FROM `textpattern` WHERE Category1 > '''' GROUP BY Category1 ORDER BY COUNT(*) DESC LIMIT 3" break=",">{Category1}</txp:smd_query>'
>
...
</txp:category_list>
Offline
Re: Article category list with images
etc wrote #285093:
You should go first with a direct sql query, with smd_query, obtaining
athree “most popular” category list,then extract from this list the first 3 categories with etc_query,that you plug into <txp:categoy_list /> and last use Els snippet.
<txp:category_list...
Great. Now I’m going to download the plug-in and give it a try.
To me queries are an unknown territory. I will study to find a way to extract from Category1 AND Category2.
In any case a category-list from cat1 only is good enough to get the 3 “most popular” categories.
Thanks again, etc
Offline