[TYPO3] active menu item sort/ display active menu item first
Walrick
lists at globalhealingcircle.net
Wed Jun 11 10:24:08 CEST 2008
Hello Kath,
***Short version:
I believe you can do this using templates.
Basic approach: instead of one menu and one marker for your menu in your
template, use four markers and create separate menutemplates for each
section.
Then by using extension templates (or conditions in your main template
for each of your sections you can assign the right menu's to the right
markers.
You'd have to find the right HMENU setup to get each of the menu's
display the correct pages, but that should be doable.
***More explanations
So in your templatefile something like
<!-- ###MENU_1### --> <!-- ###MENU_1### -->
<!-- ###MENU_2### --> <!-- ###MENU_2### -->
<!-- ###MENU_3### --> <!-- ###MENU_3### -->
<!-- ###MENU_4### --> <!-- ###MENU_4### -->
Then in the extension templates for each section something like
MENU_1 < temp.SectionC
MENU_2 < temp.SectionA
MENU_3 < temp.SectionB
MENU_4 < temp.SectionD
(Example for section C)
Or perhaps you could also define this in your main template by using
conditions. (using PIDinRootline)
And create some template records in a sysfolder in which you define the
four menus (temp.SectionA etc.)
I hope this helps. Maybe there is some other way, but I wouldn't know
how. (I've only been working with Typo3 for a few months now, but have
complex menu's on the site I'm building.)
If you need more help on this, I'd be willing to help you out, but I
don't have much time before friday. Maybe someone else can help of if
you don't mind waiting I can help you on friday. Give me mail off-list
if you want me too.
Info on HMENU:
http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/8/11/
on using conditions:
http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/4/1/
Regards,
Walrick
webmaster Global Healing Circle
www.globalhealingcircle.net
Kathryn Blair wrote:
> Hi everyone,
>
> I hope you can help me out with this. I am a TYPO3 n00b, but I've been
> trying to find an answer for my question - unfortunately I'm not sure if my
> approach is at all correct so it's hard to search for the right keywords.
>
> Anyway, here's what I need to do.
>
> I have a site with four different sections. Sections are organzied in a tree
> structure. When one is within a given section, I want the navigation for
> that section to appear at the top of my menu.
>
> Here's an illustration:
>
> Back end page structure:
> * A Section
> ** A Page
> ** A Page
> ** A Page
> * B Section
> ** B Page
> ** B Page
> ** B Page
> * C Section
> ** C Page
> ** C Page
> ** C Page
>
> When viewing a page in section C, the menu should appear like this:
> * C Section
> ** C Page
> ** C Page
> ** C Page
> * A Section
> ** A Page
> ** A Page
> ** A Page
> * B Section
> ** B Page
> ** B Page
> ** B Page
>
> And for sections A or B, the A and B sections should be on top.
>
> I approached this as a sorting problem (Ie. first the menu should sort on
> state, then on backend order (sorting)). But because alternativeSortingField
> works on fields, I don't know how to sort based on state - it's also totally
> possible that a better way to do this exists that has nothing to do with
> alternativeSortingField, I just wouldn't know what that way is. It did occur
> to me to make distinct menus for each section and order them manually, but
> I'm designing the site for other people and they won't be able to add more
> sections after I go if I do it that way.
>
> If this is at all possible, please let me know. If not I'll just have to
> hard code the order.
>
> Thanks a lot. Sorry if this is a n00bish / ridiculous / irritating question
> -- I tried to find answers but I couldn't find any answers that I thought
> I'd be able to adapt to work like this on my own.
>
> Kath Blair
>
>
>
>
>
>
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
More information about the TYPO3-english
mailing list