[TYPO3] Help understanding TYPO3
Stephen Bungert
s.bungert at metrinomics.de
Fri Oct 12 14:58:11 CEST 2007
Ok,
I've since discouvered that the | appearing were created in the CSS. Now my
menu appears but without a spacer.
How do I add a spacer?
Also I still need help with why the page order is reversed.
-----Ursprungliche Nachricht-----
Von: typo3-english-bounces at lists.netfielders.de
[mailto:typo3-english-bounces at lists.netfielders.de]Im Auftrag von
Stephen Bungert
Gesendet: Freitag, 12. Oktober 2007 14:30
An: typo3-english at lists.netfielders.de
Betreff: [TYPO3] Help understanding TYPO3
Hello,
In my template I have a naviagtion menu made out of an UL and LI elements.
// *** START CODE ***
<ul id="utilities">
<li class="topMenu_unselected"><a href="#">Item 1</a></li>
<li class="topMenu_unselected"><a href="#">Item 2</a></li>
<li class="topMenu_unselected"><a href="#">Item 3</a></li>
<li class="topMenu_unselected"><a href="#">Item 4</a></li>
<li class="topMenu_unselected"><a href="#">Item 5</a></li>
</ul>
// *** END CODE ***
After about FOUR hours of going through the tutorials
I managed to actually get the dummy navigation text replaced with the names
of the pages I want in the navigation bar.
Here's the code in the setup part of the template
// *** START CODE ***
# Configuring the Auto-Parser for main template:
plugin.tx_automaketemplate_pi1 {
# Read the template file:
content = FILE
content.file = fileadmin/templates/metrinomics/metrinomics_core.html
# Here we define which elements in the HTML that
# should be wrapped in subpart-comments:
elements {
BODY.all = 1
BODY.all.subpartMarker = DOCUMENT_BODY
HEAD.all = 1
HEAD.all.subpartMarker = DOCUMENT_HEADER
HEAD.rmTagSections = title
LI.all = 1
}
# Prefix all relative paths with this value:
relPathPrefix = fileadmin/templates/metrinomics/
}
# Menu 1 cObject
temp.menuTop = HMENU
temp.menuTop.maxItems = 5
# First level menu-object, textual
temp.menuTop.1 = TMENU
temp.menuTop.1 {
# Normal state properties
NO.allWrap = <li class="topMenu_unselected"> | </li>
# Enable active state and set properties:
ACT = 1
ACT.allWrap = <li class="topMenu_selected"> | </li>
}
# Main TEMPLATE cObject for the BODY
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
# Feeding the content from the Auto-parser to the TEMPLATE cObject:
template =< plugin.tx_automaketemplate_pi1
# Select only the content between the <body>-tags
workOnSubpart = DOCUMENT_BODY
# Substitute the ###menu_1### subpart with some example content:
subparts.utilities < temp.menuTop
# Substitute the ###content### subpart with some example content:
subparts.content = TEXT
subparts.content.value = HELLO WORLD - CONTENT
}
# Main TEMPLATE cObject for the HEAD
temp.headTemplate = TEMPLATE
temp.headTemplate {
# Feeding the content from the Auto-parser to the TEMPLATE cObject:
template =< plugin.tx_automaketemplate_pi1
# Select only the content between the <head>-tags
workOnSubpart = DOCUMENT_HEADER
}
# Default PAGE object:
page = PAGE
page.typeNum = 0
# Copying the content from TEMPLATE for <body>-section:
page.10 < temp.mainTemplate
# Copying the content from TEMPLATE for <head>-section:
page.headerData.10 < temp.headTemplate
// *** END CODE ***
This is what the menu is rendered as:
| Unternehmen | Jobs | News | Suche | Kontakt |
There are two problems with this:
1: I don' want the | at the start or the end, just in between the items
2: The actual order of the pages is
Kontakt
Suche
News
Jobs
Unternehmen
TYPO3 seems to have reversed the order of the pages. How can I correct this?
Why has it done this?
_______________________________________________
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