Textpattern CMS support forum

You are not logged in. Register | Login | Help

#71 2010-03-11 00:39:12

kbarlow
New Member
Registered: 2010-03-10
Posts: 2

Re: adi_cat_menu – Category & article menu

Oh! Shoot, I wonder what I’m doing wrong…

This is the tag I’m using:
<txp:adi_cat_menu parent=“Projects” this_section=“yes” active_only=“yes” />

The form: (adi_cat_menu_articles)
<li<txp:adi_cat_menu_if> class=“active_class”</txp:adi_cat_menu_if><txp:rvm_if_this_article> class=“active_class”</txp:rvm_if_this_article>>
<txp:permlink><txp:title/></txp:permlink>
</li>

Thoughts? Thank you!

Offline

#72 2010-03-18 10:00:50

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

Re: adi_cat_menu – Category & article menu

kbarlow wrote:

Oh! Shoot, I wonder what I’m doing wrong…

Just for the record, the short answer is nothing. I’ve had some off-forum conversations with kbarlow & it turned out that adi_cat_menu (& my understanding of it) was a little lacking. Basically, the active class was not being applied to the category <li> when in individual article display mode.

This has been fixed up now and version 0.5 is available for download. The new version also includes some older enhancements previously only available in beta releases:

  • new attribute: ‘list_empty_cats’ (for floodfish)
  • new attributes ‘list_id’ & ‘list_id_prefix’ (for floodfish)
  • new attributes: ‘wraptag’, ‘wraptag_id’, ‘wraptag_class’
  • new attribute: ‘active_parent’ (for kbarlow)

I haven’t made the new active_class behaviour the default – not wanting to cause any nasty surprises – so active_parent="1" is required to switch it on.

Usual terms & conditions apply – if I’ve broken something, apologies in advance.

Offline

#73 2010-03-18 10:22:22

jpdupont
Member
From: Virton (BE)
Registered: 2004-10-01
Posts: 750
Website

Re: adi_cat_menu – Category & article menu

Thanks Adi !
Again enhancements to one of my favorite plugins :-)))

Offline

#74 2010-03-18 17:23:17

floodfish
Member
From: Brooklyn, NY
Registered: 2007-01-11
Posts: 155
Website

Re: adi_cat_menu – Category & article menu

Thanks, Adi! Very nice to see all this official.

Wow, yes, you gave me the magic beta of this plugin (with my beloved “list_empty_cats”) just before I got a cancer diagnosis (rather distracting!) and fell out of touch. Anyway, we should resume our discussion of the terms of my sponsorship offlist.

Offline

#75 2010-03-18 22:01:03

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

Re: adi_cat_menu – Category & article menu

Jason, good to see you’re back.

Adi

Offline

#76 2010-04-12 14:34:21

bmwg
Member
Registered: 2010-04-06
Posts: 39

Re: adi_cat_menu – Category & article menu

I posted in the (archived) stw_category_tree thread a while ago without getting an answer. Now I’ve come across adi_cat_menu and I wonder if it’s possible to do the things I wanted to do with stw_category_tree.
Here is my old post (I hope it’s ok to re-post it here):

————-
I have 4 lists on my start page which is the default section. List 1-3 are the 3 main product groups with their subproducts listed underneath and list4 is filled with about, references, ..
Product group 1:
<txp:stw_category_tree start=“productGroup1” maxlevel=“1” section=“products”/>

Maxlevel is to avoid showing subProducts on the start page.

Now if I click on product1 in the productGroup1 list I get to my products section. Here I want to show 2 lists. 1 with all the products of productGroup1 with product1 active (since this was the link I clicked on the startpage). And another list with the subProducts of the active product.

How would I do that?
Right now i have <txp:stw_category_tree start=”*” /> which gives me the subProducts. But as soon as I click on a subProduct, the list gets empty because it tries to fill in subSubProducts (which don’t exist).
My question is: how do I get lists on an absolute level in the hierarchy? So that list1 always displays the (right) 2nd level of my category tree (absolute, the 2nd level from the root) and list2 always displays the right 3rd level of my category tree (if something is selected on the 2nd level)?
————-
Is it possible to do that with adi_cat_menu?

Offline

#77 2010-04-12 18:01:37

floodfish
Member
From: Brooklyn, NY
Registered: 2007-01-11
Posts: 155
Website

Re: adi_cat_menu – Category & article menu

bmwg, I suspect what you want is possible with adi_cat_menu, but I’m not sure I totally follow all of it. It might help us help you if you rewrite the description of what you’re trying to do without the references to stw_category_tree and its attributes.

Offline

#78 2010-04-13 06:28:40

bmwg
Member
Registered: 2010-04-06
Posts: 39

Re: adi_cat_menu – Category & article menu

floodfish, the main thing is:
My categories are hierarchical. Products-> productGroup1 -> product1.1 -> product1.1.1
Now I have some div containers on a site reserved for the submenus. For instance if you click on productGroup1 in a list that shows in div1 I want to show the list of products that are children of productGroup1 in div2 (product1.1 .. product1.n) and if I selecte a product on div2 I want a list of articles that have product1.1 (or whatever is selected in the list in div2) as their first category in div3.
The main problem with stw_category_tree was I couldn’t make sure for instance to always have the second level of the tree in a particular list. Because as soon as I selected something, my code looked for the second level starting with the active category. But I want it to work absolute, that is always the second level from the root of the tree.
So it’s really a basic task, but I’m completely new to textpattern and I’m not sure how to do it.

Offline

#79 2010-04-13 16:36:31

floodfish
Member
From: Brooklyn, NY
Registered: 2007-01-11
Posts: 155
Website

Re: adi_cat_menu – Category & article menu

Sounds like you’ll need some javascript for that interface. To generate the lists themselves, I think adi_cat_menu will work. You may even be able to do it with txp:article_custom. My advice (which is not the most expert) would be to try with article custom and then check adi_cat_menu again when/if you hit the limits of what you can do with it.

Offline

#80 2010-04-14 11:53:45

bmwg
Member
Registered: 2010-04-06
Posts: 39

Re: adi_cat_menu – Category & article menu

Sorry, I didn’t see the wood for the trees. stw_category_tree does the job pretty well.

Offline

Board footer

Powered by FluxBB