Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2016-10-19 21:52:31

miles
Member
From: Plymouth
Registered: 2008-05-22
Posts: 78
Website

Article combine

Hopefully this makes sense and isn’t too criptic!

Basically is there a plugin which can combine the two strings below so I can randomise the listing:

<txp:article_custom form=“hub_block” pgonly=“0” limit=“1000” sort=“rand()” section=“news, blog, videos” />

<txp:article_custom form=“hub_block” pgonly=“0” limit=“1000” category=“case-studies” sort=“rand()” section=“hair, construction, business, care, engineering, sport, teaching” />

Offline

#2 2016-10-20 05:06:21

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: Article combine

Perhaps such option is suitable:

<txp:aks_article form=“hub_block” limit=“2000” sort=“rand()” where=”(section in(‘news’, ‘blog’, ‘videos’) or ((category1=‘case-studies’ or category2=‘case-studies’) and section in(‘hair’, ‘construction’, ‘business’, ‘care’, ‘engineering’, ‘sport’, ‘teaching’)) )” />

Plugin: aks_article


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#3 2016-10-20 05:55:21

miles
Member
From: Plymouth
Registered: 2008-05-22
Posts: 78
Website

Re: Article combine

makss wrote #302331:

Perhaps such option is suitable:

<txp:aks_article form=“hub_block” limit=“2000” sort=“rand()” where=”(section in(‘news’, ‘blog’, ‘videos’) or ((category1=‘case-studies’ or category2=‘case-studies’) and section in(‘hair’, ‘construction’, ‘business’, ‘care’, ‘engineering’, ‘sport’, ‘teaching’)) )” />

Plugin: aks_article

Thank you Makss, works perfectly!

Offline

Board footer

Powered by FluxBB