Technology Tools for Ministry

Community

Web-Empowered Church Developer's Community
All Categories > Developers > Templates > Sub menu - third level, but not inline with other topics
Total Posts: 8 - Pages (1): [1]
Author: Tim Jeter
Posted: Jun 13 2007 - 02:45 AM
Subject: Sub menu - third level, but not inline with other topics
Hello anyone, everyone...

I am in the middle of constructing a Typo3-based site for my church (http://69.89.31.62/~mcaonlin/index.php?id=home) and I have a question about menus; I am fairly new to typo3 and typoscript so please bear with me. If you look at that page as a reference, my question might make more sense.

In the top menu if you go to the topic 'Ministries', you will see a blank page but the sub-menu will appear. The sub-topics are: Special Interest, Adult, Teen & Young Adult, Children and Global. So under the 'Adult' topic, I have pages created for: Men, Women, Adult Development and Newly Married, but there are currently no links to them. what I would like is for the third-level links to appear on the page (probably to the right side, in place of the 'News' area), only when you are in that sub-section.

Can anyone help out in trying to make that happen? I was wondering if I need to set the typoscript in the main template to 'hide in menu' (is that the proper term?), and then when it gets to those pages go into the setup and override the typoscript to have them displayed. But at this point I'm confused; every other online tutorial that I try and pull up is geared toward a flyout or dropdown menu with three levels - nothing about splitting the menu and having different parts displayed on different areas of the page.

Any help would be much appreciated!
Thanks,
-TC
Author: Jeff Segars
Posted: Jun 14 2007 - 06:46 PM
Subject: re: Sub menu - third level, but not inline with other topics
Hey Tim,
I am in the middle of constructing a Typo3-based site for my church (http://69.89.31.62/~mcaonlin/index.php?id=home) and I have a question about menus; I am fairly new to typo3 and typoscript so please bear with me. If you look at that page as a reference, my question might make more sense.

Your site looks great! If you've figured out templating, you must be making some good progress

If you look at the menu configuration in the WEC Starter Package, I think that will help you out. In the main menu, we have the following Typoscript....

# Main Horizontal dropdown menu
lib.mainmenu = HMENU
lib.mainmenu {
wrap = <div id="menu"> | </div>
entryLevel = 0


1 = TMENU
1 {
noBlur = 1
expAll=0
wrap = <ul id="menuList" class="adxm"> | </ul>

NO {
linkWrap = <span> | </span>
wrapItemAndSub = <li> | </li>
stdWrap.htmlSpecialChars = 1
}
ACT = 1
ACT {
linkWrap = <span class="act"> | </span>
wrapItemAndSub = <li> | </li>
stdWrap.htmlSpecialChars = 1
}
}

2 = TMENU
2 {
...
}

3 = TMENU
3 {
...
}

4 = TMENU
4 {
...
}
}


1,2,3, and 4 all define the different levels of the menu. If you want your menu to only go 2 levels deep, then just delete the Typoscript for levels 3 and 4. You can do this in the main Typoscript template to have it affect the entire site or on the Ministries page if you only want it to affect pages within the ministries section.

The Starter Package menu configuration may also help you out with with the alternate menu location. It defines an alternate menu that starts at a lower level in the pagetree than the main menu. You'll notice that lib.mainmenu above has entryLevel = 0. This tells it to show the top level pages on the site. The definition for lib.altmenu uses entryLevel = 1, so that means it only shows second level pages inside the current page. This would allow you to show specific ministries through a separate Typoscript-based menu. You can then map that menu through TemplaVoila and have it show up anywhere on your page.

#Submenu
lib.altmenu = HMENU
lib.altmenu {
entryLevel = 1
1 = TMENU
1 {
noBlur = 1
expAll = 1
wrap = <ul> | </ul>
NO {
wrapItemAndSub = <li> | </li>
stdWrap.htmlSpecialChars = 1
}
}

...


Hope those general instructions are at least a little helpful. If you need some more details, just let us know.

Thanks,
Jeff
Author: Tim Jeter
Posted: Jun 16 2007 - 03:32 AM
Subject: re: Sub menu - third level, but not inline with other topics
Jeff,

Thanks for the reply - I might need just a bit more detail, but I'll get back to you here in the next day or so after I've had a chance to try this out. One of the frustrating things for me (like other types of programming) is that the change can't be made directly to the parent of the sub-pages - i.e., the 'Ministries' page. I can't just go and add typoscript for that page and its children.

Another thing that I'm not too keen on is the addition of an editable area through TemplaVoila. I think I read through it somewhere, but it seemed tedious at first glance.

More to come; thanks for your time,
-Tim
Author: Tim Jeter
Posted: Jun 19 2007 - 03:11 AM
Subject: re: Sub menu - third level, but not inline with other topics
All,

Well, I'm kind of lost on this one - I'm not sure how to get the sub-menu to display for just this section. If I tell the main template to show me 4 levels, then when I go into every other sub-section of the site I will see all of the other sub-section links as options, right?

I would only like to see them like this (the ones in bold would be visible while on the selected page (underlined and bold)...

I.
---A.
----------1.
----------2.
----------3.
----------4.

---B.
---C.
----------1.
----------2.
----------3.
----------4.
II.
---A.
---B.
----------1.
----------2.
----------3.
----------4.
---C.
III.
---A.
---B.
...

Thanks for any help you can offer!
-Tim
Author: Barbara Bowser
Posted: Jun 20 2007 - 02:50 PM
Subject: re: Sub menu - third level, but not inline with other topics
Hi Tim,

If I understand you correctly, you want to have only the current section's sub-pages show? To do that, change the value of

expAll = 1


to

expAll = 0


This will only allow the current section's pages to show. You would need to do this for each level of the menu, so if you wanted this display behavior to carry down, it would look something like this:

#Submenu
lib.altmenu = HMENU
lib.altmenu {
entryLevel = 1
1 = TMENU
1 {
noBlur = 1
expAll = 0
wrap = <ul> | </ul>
NO {
wrapItemAndSub = <li> | </li>
stdWrap.htmlSpecialChars = 1
}
}
2 = TMENU
2 {
noBlur = 1
expAll = 0
wrap = <ul> | </ul>
NO {
wrapItemAndSub = <li> | </li>
stdWrap.htmlSpecialChars = 1
}
}
}

The number preceding the TMENU object defines the level of the menu, so however many levels you anticipat, you can define.

I hope that was what you were looking for.

Thanks,
Barbara
Author: Juraj Michelik
Posted: Feb 11 2008 - 12:21 PM
Subject: re: Sub menu - third level, but not inline with other topics
Hello friends,

I have problem with the menu of the clone of template Natural of Hope, because I don,t see items of the third level menu for curent page. You can see it on the test page http://test.skcold.sk for Historia pages.

Thanks for any helps.
Author: Jeff Segars
Posted: Feb 11 2008 - 11:53 PM
Subject: re: Sub menu - third level, but not inline with other topics
Juraj,
I double checked the behavior on the default Nature of Hope template series and everything is working there. I would suggest comparing your menu configuration to the default template to see if there are differences.

The Nature of Hope template series uses different menu Typoscript than the other WEC templates. For this reason, the menus are defined with the local processing field of each TemplaVoila Template Object so that's where you should check when making your comparisons.

Thanks,
Jeff
Author: Juraj Michelik
Posted: Feb 18 2008 - 07:30 AM
Subject: re: Sub menu - third level, but not inline with other topics
Hi Jeff,

you've been right. I changed LP for 2. submenu from wrapItemAndSub = <li><span class="act"> | </span></li> to wrapItemAndSub = <li> | </li> and it's work. But I don't know it's realy corect.
Be bless,

georgesk
Total Posts: 8 - Pages (1): [1]
You must login to post a message to this conference.