TYPO3Jack.net - Das TYPO3 Mailinglist Forum Archiv

TYPO3 Mailingliste: nicht fragen - lesen!

TYPO3 Mailingliste: nicht fragen - lesen!_RR_1-->
Zurück   TYPO3Jack.net - Das TYPO3 Mailinglist Forum Archiv > TYPO3-Mailinglists: ENGLISH > typo3-english@lists.netfielders.de

Registrieren Hilfe Benutzerliste Kalender Suchen Heutige Beiträge Alle Foren als gelesen markieren
  #1  
Alt 12.10.2007, 14:29
Stephen Bungert
Gast
 
Beiträge: n/a
Standard [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 (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #2  
Alt 12.10.2007, 14:58
Stephen Bungert
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] Help understanding TYPO3

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 (DOT) netfielders.de
[mailto:typo3-english-bounces (AT) lists (DOT) netfielders.de]Im Auftrag von
Stephen Bungert
Gesendet: Freitag, 12. Oktober 2007 14:30
An: typo3-english (AT) lists (DOT) 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 (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english

_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #3  
Alt 12.10.2007, 16:16
Tomas Mrozek
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] Help understanding TYPO3

> 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?


Let me guess: all your list items have a CSS attribute "float:right".
Check the source code and I bet that "Kontakt" is the first list item.

You can either set "float:left" or, if not possible for design reasons,
actually DO make TYPO3 to generate the menu in reverse order:

temp.menuTop.1.alternativeSortingField = sorting DESC

Tomas Mrozek
_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #4  
Alt 12.10.2007, 16:48
JoH
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] Help understanding TYPO3

> # 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>
>
> 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


This is a job for optionSplit:
http://typo3.org/documentation/docum...3/1/#id3520928

According to the TSref you should change your code to look like this:
# Normal state properties
NO.allWrap = <li> | </li>|*||*|<li class="last"> | </li>

# Enable active state and set properties:
ACT = 1
ACT.allWrap = <li class="act"> | </li>|*||*|<li class="act_last"> | </li>

you don't need the "topMenu" in the class of the <li> since you could use
<ul class="topMenu"> and then do a proper cascading.

HTH

Joey


_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
 

Lesezeichen

Themen-Optionen
Ansicht Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an


Ähnliche Themen

Thema Autor Forum Antworten Letzter Beitrag
[TYPO3] help with understanding how pi1 class php files relate tothe database dave typo typo3-english@lists.netfielders.de 0 29.05.2007 17:36
[TYPO3-dev] Understanding ext_tables.php Fr. Simon Rundell SCP typo3-dev@lists.netfielders.de 1 23.05.2007 10:35


Alle Zeitangaben in WEZ +1. Es ist jetzt 07:55 Uhr.


Powered by vBulletin® Version 3.7.4 (Deutsch)
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Template-Modifikationen durch TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75