Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-12-24 07:30:28

jagorny
Member
From: Portland, OR
Registered: 2006-08-24
Posts: 39
Website

rss_unlimited_categories_filedunder - no-brainer mod...

Hey folks,

After pulling my hair out – you may want to make this no-brainer change to the mod.

Out of the box, when you run the <rss_unlimited_categories_filedunder /> tag you have to put in a linktosection that is hard coded. If you don’t, it defaults to ‘article.’

If you’d like the link-to section to default to the section the article actually belong to, look for the following code:

	function rss_unlimited_categories_filedunder($atts) {
			global $thisarticle;
			extract(lAtts(array(
				'section' => '',
				'linktosection' => 'article',
				'parent' => '',
				'usemessy' => 0,
				'listwraptag'  => '',
				'break'    => ', ',
				'wraptag'  => '',
				'label'    => '',
				'labeltag' => '',
				'class'       => '',
				'breakclass'  => '',
				'sortdir' => 'asc'
			),$atts));

Replace the 'article', with $thisarticle['section'] – now the categories will get displayed in the same section as they articles they belong to (since categories technically don’t have sections).

Offline

Board footer

Powered by FluxBB