Technology Tools for Ministry

Community

Web-Empowered Church User Community
All Categories > Getting Started > Templates > separate Mainmenu and Submenus
Total Posts: 8 - Pages (1): [1]
Author: Manfred Hungerland
Posted: Jul 23 2008 - 09:16 AM
Subject: separate Mainmenu and Submenus
Hi

is there a Way to use separate Menus for the Mainmenu and the Submenus?
I started the Work with the Template LoveInAction_3Col_Aqua.

Like in this Page: http://iblp.org/iblp/discipleship/

I need to redo this in German.

Shalom
Manfred

user picture Author: Jason Gillett
Posted: Jul 23 2008 - 04:33 PM
Subject: re: separate Mainmenu and Submenus
You could use the Menu/Sitemap content element (it's a special element and may only say Sitemap). I believe it comes pre-installed. Add it as a content element, then select "Menu of subpages to these pages" as the menu type. I'm not sure if you can edit the style or not.

alternatively you might do a search for subpage in the ext repository.
user picture Author: Barbara Bowser
Posted: Jul 28 2008 - 11:55 AM
Subject: re: separate Mainmenu and Submenus
Manfred,

Do you want your menus to auto-generate based on your page tree, or do you want more control over which pages are show in the menus? If it is the latter, then I would use the Menu/Sitmap as Jason suggested. If you want them to auto-generate based on the page tree, there is more work to be done. You would most likely have to create a custom template adding a new menu to the top of the page. This can be done, but requires some knowledge of the TemplaVoila template engine.

You would create a new placeholder for the menu in the HTML file (a <div> would be fine). You'd then map that placeholder in TemplaVoila to a new field (such as "submenu"). You'd then have to tell TemplaVoila how to populate that field through Typoscript in the Local Processing file associated with the Template. You could change the level that the menu would start at ... "0" is root level, "1" is second level, and so on. It is a bit involved, but could be done.

Hope that helps,
Barbara
Author: Manfred Hungerland
Posted: Jul 28 2008 - 12:11 PM
Subject: re: separate Mainmenu and Submenus
Hi Together / Hi Barbara

Do you want your menus to auto-generate based on your page tree

The Menus should be auto-generate, so there is a possibility to change that "easy".

Thought this will be a "little bit" work..
You would create a new placeholder for the menu in the HTML file (a <div> would be fine).
Did this already.


You'd then map that placeholder in TemplaVoila to a new field (such as "submenu")
Will try that.

You'd then have to tell TemplaVoila how to populate that field through Typoscript in the Local Processing file associated with the Template.

Any Help on that ( or a Manual link .. )

Shalom
Manfred
user picture Author: Barbara Bowser
Posted: Jul 28 2008 - 01:57 PM
Subject: re: separate Mainmenu and Submenus
Manfred,

I think the easiest solution for the Typoscript is to copy what is being used for the main menu. If you look under the TemplaVoila Control Panel (TemplaVoila > Storage Folder), locate your template, then click the edit icon next to "Local Processing". You may see something similar to this:

<field_mainmenu type="array">
<tx_templavoila type="array">
<TypoScriptObjPath></TypoScriptObjPath>
<TypoScript>
<![CDATA[
10 = HMENU
10 {
#wrap = <div id="menu"> | </div>
entryLevel = 0

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

NO {
wrapItemAndSub = <li> | </li>
stdWrap.wrap = <span> | </span>
stdWrap.htmlSpecialChars = 1
stdWrap.crop=15 | ...
}

ACT < .NO
ACT = 1
ACT {
wrapItemAndSub = <li class="active"> | </li>
}
}
2 = TMENU
2 {
expAll=1
wrap = <ul class="level2"> | </ul>
noBlur = 1
NO {
wrapItemAndSub = <li class="submenu"> | </li>
stdWrap.htmlSpecialChars = 1
stdWrap.crop=15 | ...
}
ACT = 1
ACT {
wrapItemAndSub = <li class="active"> | </li>
stdWrap.htmlSpecialChars = 1
stdWrap.crop=15 | ...
}
}
3 = TMENU
3 {
expAll=1
wrap = <ul class="level3"> | </ul>
noBlur = 1
NO {
wrapItemAndSub = <li class="submenu"> | </li>
stdWrap.htmlSpecialChars = 1
stdWrap.crop=15 | ...
}
ACT = 1
ACT {
linkWrap = <span class="act"> | </span>
wrapItemAndSub = <li><span class="act"> | </span></li>
stdWrap.htmlSpecialChars = 1
stdWrap.crop=15 | ...
}
}
4 = TMENU
4 {
expAll=1
wrap = <ul class="level4"> | </ul>
noBlur = 1
NO {
wrapItemAndSub = <li class="submenu"> | </li>
stdWrap.htmlSpecialChars = 1
stdWrap.crop=15 | ...
}
ACT = 1
ACT {
linkWrap = <span class="act"> | </span>
wrapItemAndSub = <li><span class="act"> | </span></li>
stdWrap.htmlSpecialChars = 1
stdWrap.crop=15 | ...
}
}
}
]]>
</TypoScript>
</tx_templavoila>
</field_mainmenu>


I believe you can use this same structure, adding it to the Local Processing XML. You would just change the field name from "mainmenu" to whatever you named your field during the Mapping process ("submenu" or the like). Depending on how many levels of navigation you want, you can add/remove from the list ... 1 is the first level, 2 is the second, and so on. Also, be sure to set the entryLevel to the appropriate level where your menu should pickup.

I hope that helps get you started. Remember, before you begin any editing on existing templates, you'll want to make a backup of the original. I'd definitely recommend working from a duplicate template if possible so that you have a custom copy that won't be overwritten later on.

Godspeed,
Barbara
Author: Manfred Hungerland
Posted: Jul 29 2008 - 12:13 PM
Subject: re: separate Mainmenu and Submenus
Hi Barbara

Thank You for Your Tips.
Will Try that and give then a Feedback.

Shalom
Manfred
Author: Manfred Hungerland
Posted: Aug 20 2008 - 11:51 AM
Subject: re: separate Mainmenu and Submenus
Hi Barbara

sorry for long Time no Feedback.
Tried Your suggestion. I found out that in the Template Love In Action - 3 Column, Aqua
There is noting in >> Local Processing:

In other Templates there is some Content similar to your example.
Of course i used Love In Action as starting Point for my Template .
Trying various ways without success.
Any Help again

Shalom
Manfred
Author: Manfred Hungerland
Posted: Sep 08 2008 - 02:58 AM
Subject: re: separate Mainmenu and Submenus
Hi Barbara

thanks for Your Support.
For this Site i now switch to Yaml because there was some Problem also with the IE and
the Submenu. ( In Yaml this is a default ).

Many Than's !!
Shalom
Manfred
Total Posts: 8 - Pages (1): [1]
You must login to post a message to this conference.