Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
multiple categories/sections with [txp:article_custom/]
It would be useful if the article_custom tag’s section and category attributes accepted a comma separated list of sections/categories.
[edit] Oh, I see chh_article_custom does this… still, it’d be nice to incorporate some of this stuff into the core.
Last edited by mrdale (2007-02-14 22:02:18)
Offline
#2 2007-03-01 03:30:10
- nardo
- Member
- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: multiple categories/sections with [txp:article_custom/]
seconded – coke’s plugins are great but unfortunately don’t look like they’re being updated to follow Txp development
Offline
Re: multiple categories/sections with [txp:article_custom/]
I second this too. It would be very important to not rely on plugins. Also needed for txp:related_articles tag!
Z
Offline
Re: multiple categories/sections with [txp:article_custom/]
Zanza wrote:
I second this too. It would be very important to not rely on plugins. Also needed for txp:related_articles tag!
I agree too.
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
#5 2007-03-03 07:38:13
- FireFusion
- Member
- Registered: 2005-05-10
- Posts: 698
Re: multiple categories/sections with [txp:article_custom/]
Agreed
Offline
Re: multiple categories/sections with [txp:article_custom/]
Well we all agree, does someone have the chops to put together a patch and submit it?
Sadly I’m no PHPer.
Offline
Re: multiple categories/sections with [txp:article_custom/]
Hmm. Well I have been using chh_article_custom for a while, but tried to whip up a hack to see if I could avoid using the plugin. Try replacing line 600 of publish.php with:
if ($section) {
$sections = explode(',', $section);
for ($i=0; $i < count($sections); $i++) {
$sections[$i] = "Section = '".doSlash($sections[$i])."'";
}
$section = 'and ('.implode(" OR ", $sections).')';
}
else $section = '';
Limited testing seems to yield favorable results. I can submit it as a patch, although it could probably be simplified a bit..
Last edited by Jeff_K (2007-05-22 06:25:10)
Offline