Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2009-07-13 16:52:34

alarius
Member
Registered: 2009-05-28
Posts: 45

Re: Go to Category section from wherever

hi Els and everyone is interested about this problem…
so, I’m going on but it’s becoming every step more complicate…
now I have a really (too) long list of subcategory on my left side.
as I told you before, could be something good if I can have a compact menu, I’m trying to do it but I’g going crazy..
the result hase to be something like only the two voices on the menu, and “expand” on the click of the mouse, showing the sub categories…
a better thing probably is that I see the first category kindosweetness with all the subcategories (child) listed on the menu,
and the last voice only the link to the second category provenienceofit without subcategories (child) listed.
on click of provenienceofit the behaviour must invert, show only the subcategories of the second and only the link to the first…
hope to be understood!! :) my english is bad sorry…
some help please?

Last edited by alarius (2009-07-13 16:58:56)

Offline

#32 2009-07-14 15:45:51

alarius
Member
Registered: 2009-05-28
Posts: 45

Re: Go to Category section from wherever

I’m trying to modify this tip
http://txptips.com/drop-down-menu-using-txp-tags
adapting for my problem, but probably I need help :(

Offline

#33 2009-07-14 19:23:20

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Go to Category section from wherever

alarius, I wrote that tip, what help do you need?

Offline

#34 2009-07-15 10:22:05

alarius
Member
Registered: 2009-05-28
Posts: 45

Re: Go to Category section from wherever

Hi jstubbs! well, I have two parent categories:
kindosweetness
provenienceofit
and a lot of child categories in both of them.
after this I have articles.
What I need is
1: have a left menu with only the two parent categories;
2: by selecting one, it shows the list of the children categories of the selected parent, but It has to appear on the left menu at the bottom of the specific category;
3: by selectin a child category, it show the list of articles of that child category in the content part of the page.

—- example of left side menu with no selection (bold is a link):

kindosweetness

provenienceofit

—- now I click on kindosweetness:

kindosweetness
__ cakes
__ puddings
__ other kind of sweetness

provenienceofit

—- now I click on provenienceofit:

kindosweetness

provenienceofit
__ united states
__ the nederlands
__ france

Offline

#35 2009-07-16 08:41:20

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Go to Category section from wherever

Hi alarius,

Basically you need a script to open/close the child categories. Take a look at this TXP Tip which includes most of what you need.

Don’t have time for more this morning, but it should get you started…

Offline

#36 2009-07-21 16:16:53

alarius
Member
Registered: 2009-05-28
Posts: 45

Re: Go to Category section from wherever

not what I need…
with the code
<txp:category_list parent="kindofsweetness"
exclude="kindofsweetness" label="kind" sort="Title ASC" section="products" active_class="active" type="article" />
</p>
<txp:category_list parent="provenienceofit"
exclude="provenienceofit" label="provenience" sort="Title ASC" section="products" active_class="active" type="article" />
it works good, because it shows on the left side the list of sub-categories of both main categories.
the problem is the length of the menu, so I’m searching help for having on the homepage only two links
to the two parent categories on the left menu, and selecting one category something to output in the left menu
the subcategories of that category.
I suppose I have to code this
<a href="?s=products&c=kindofsweetness">kind</a>
</p>
<a href="?s=products&c=provenienceofit">provenience</a>
but it doesn’t work, I see nothing if I select one of the two links.
probably I have to make two static pages?

Offline

#37 2009-07-21 21:12:49

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Go to Category section from wherever

I think I understood you correctly in my previous post. If you look again at the TXP Tip I referred to, you may notice the “Add some jQuery magic” at the bottom of the article, which outlines a method of toggling the status of the categories.

This page features the same method but this time for an FAQ section.

Take a look and let us know if this is what you want…

Offline

#38 2009-07-23 15:43:12

alarius
Member
Registered: 2009-05-28
Posts: 45

Re: Go to Category section from wherever

hi everyone!
well, I tried what you suggest; I copied and pasted exactly the same code of that faq tip into my leftside container on the page template, and the javascript code on the head tag.
I obtained the right behaviour of the menu but in the wrong way:
now I see the first parent category (and it’s not a link) and below it there are it’s subcategories articles (are links) and if I click on one of it, it appears the article (or disappears on the next click) but it’s on the left menu anytime!!
what I need is to have the behaviour I descripted in my #34, so :
1 – the left menu with only the categories (links),
2 – selecting one category appears (or disappear) the subcategory list of that category in the same left side menu
3 – selecting one of the subcategory it appears the list of it’s articles on the central container of the page
4- selecting one article it appears that article on the central container

so, that I need is modify that useful faq code you told me, but I cannot understand in what way I have to do it.

Offline

#39 2009-07-23 20:23:47

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Go to Category section from wherever

Care to share a link to your page to take a look?

Offline

#40 2009-07-24 11:49:31

alarius
Member
Registered: 2009-05-28
Posts: 45

Re: Go to Category section from wherever

it’s not possible, I’m working in local…
do you think there are other ways to obtain what I need?
it’ seems simple, but I can’t get out of it

Offline

#41 2009-07-24 18:46:41

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Go to Category section from wherever

Well just post the code you have now so I can take a look.

Offline

Board footer

Powered by FluxBB