Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#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
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
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
Re: adi_cat_menu – Category & article menu
hello guys!
How i can do this one:
• Milk • Milk
• Milk • Milk
• Milk • Milk
• Milk • Milk
how to make that list would automatically goes to the second column after the first column, for example, collected a 5 lines?
<txp:txp_me />
Offline
#82 2010-06-21 01:19:29
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_cat_menu – Category & article menu
Katalonian wrote:
hello guys! How i can do this one:
The question might be better asked in the Presentation Forum but if you want:
Milk1 Milk2
Milk3 Milk4
Milk5 Milk6
Milk7 Milk8
Then set the width of the <ul>, set the width of the <li> to half the <ul> width, & float:left the <li>.
If you want:
Milk1 Milk5
Milk2 Milk6
Milk3 Milk7
Milk4 Milk8
Then I’m not sure. Can’t think of a CSS solution off the top of my head. You might have to generate the menu in 2 halves & then position them next to each other.
Offline
#83 2010-07-05 04:09:00
- Bijay
- Member
- Registered: 2010-07-02
- Posts: 17
Re: adi_cat_menu – Category & article menu
hi gomedia. i have used “adi_cat_menu” plugin to show the category along with the article related to that category. it works absolutely fine but i am unable to link the article related to those category. it would be great help if you could help me.
Offline
#84 2010-07-06 12:33:42
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_cat_menu – Category & article menu
Just for the record … spoke with Bijay off-forum & looked like it might be a page/article form problem, rather than something wrong with adi_cat_menu.
Offline
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
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