Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#85 2010-08-05 08:52:21

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

Re: adi_cat_menu – Category & article menu

This has come up a couple of times in the thread, but i’m looking to do this:

—Category1
—Subcategory1
—-Subsubcategory1
——Article1
——Article2
—-Subsubcategory2
——Article3
——Article4
—Subategory2

…etc

but subsubcategories are not nested properly, as pointed out here

is there any solution?


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

#86 2010-09-07 06:13:28

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_cat_menu – Category & article menu

kemie wrote:

is there any solution?

For the record, here’s a non-plugin solution on TXP Tips

Offline

#87 2011-01-11 20:01:54

aeris
Member
Registered: 2009-03-01
Posts: 12

Re: adi_cat_menu – Category & article menu

I just tried cbs_category_list (trying to switch from pure category-based navigation to section-sensitive category lists), and while it works perfect, it doesn’t have any kind of sorting or exclusion options.

This was the only other plugin that I found, but <txp:adi_cat_menu section_sensitive="1" /> does nothing, <txp:adi_cat_menu this_section="1" /> and <txp:adi_cat_menu section="<txp:section /> /> list all categories regardless of section.

I have only one page template and one listform for showing articles, with messy links.

Last edited by aeris (2011-01-11 20:24:19)

Offline

#88 2015-06-15 03:00:28

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_cat_menu – Category & article menu

I wonder if anyone uses this any more? Anyway, version 0.6 available for download – nothing earth shattering, just TXP 4.6 tag registration.

(and apologies to aeris for missing the 4-year-old query above).

Offline

#89 2018-08-23 16:09:15

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: adi_cat_menu – Category & article menu

Hi Adi,

I play with this plugin (again !) and I need to restrict output to category1 or 2.

I see in your code this attribute : restrict

'restrict' => '', // category1 or category2

But no effect because restrict is not linked in the function code …

Easy to modify ?

Offline

#90 2018-08-23 17:33:01

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: adi_cat_menu – Category & article menu

Work with this mod line 187

      $restrictstr="";
        if ($restrict == "") {$restrictstr = " WHERE (c.name = t.Category1 OR c.name = t.Category2);"};
        if ($restrict == "category1") {$restrictstr = " WHERE (c.name = t.Category1);"};
        if ($restrict == "category2") {$restrictstr = " WHERE (c.name = t.Category2);"};
		$rs = startRows(
			'SELECT c.name, c.title'.$showcount.' FROM `'.PFX.'txp_category` AS c, `'.PFX.'textpattern` AS t'.$table
			.$restrictstr
                      //.' WHERE (c.name = t.Category1 OR c.name = t.Category2)'

			.$include_list
			.$exclude_list
			.' AND c.type = \'article\' AND t.Section = '.$sqlsection.$parent.$posted
			.' AND t.Status = '.$sticky.' GROUP BY c.name'.$sort
			,$debug);

Offline

#91 2018-08-23 22:29:28

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_cat_menu – Category & article menu

jpdupont wrote #313600:

I play with this plugin (again !) and I need to restrict output to category1 or 2.

A blast from the past!

Restrict must’ve been a “future” enhancement but never would’ve thought that it’d be this far into the future.

You’ve coded it too. My ideal customer! The least I could do would be to make it official … stand by.

Offline

Board footer

Powered by FluxBB