[TYPO3] Very basic template question...

Christopher Torgalson bedlamhotel at gmail.com
Mon Aug 27 20:15:18 CEST 2007


Hi,

On 8/27/07, Ben <benspamin at yahoo.com> wrote:
> >>> You can also find out where it is defined by
> mousing over one of the lines you pasted in--a tooltip
> will pop up showing the line number where the property
> is defined. You can then use the TS Template Analyzer
> to find exactly WHICH TS template contains that
> line.>>>
>
> okay i did that - it says it's defined in "USARPS
> League, 4717 - i assumed that meant the template
> called "USARPS League"- (which is the main template
> file) but line 4717? that seems too high -  according
> to the template analyzer:
>
> EXT:tt_news/static/css/
> EXT:tt_news/static/ts_old/
> EXT:css_styled_content/static/
> EXT:static_info_tables/static/...
> EXT:ext_fe_users/pi1/static/
> EXT:tt_news/static/ts_new/
> EXT:sr_feuser_register/static/...
> newloginbox
> tt_address
> extendedshop
> chc_forum
> macina_banners
> ve_guestbook
> -> USARPS League X X X 1(0)
>
> clicking on the USARPS League template from that list
> brings up the Constants and Setup screens - searching
> through there for menuHeader brings me back to this:
>
> lib.menuHeader >
> lib.menuHeader = HMENU
> lib.menuHeader.entryLevel = 0
> lib.menuHeader.1 = TMENU
> lib.menuHeader.1 {
>
> expAll = 1
> wrap =<ul class="nav">|</ul>
>
> NO.ATagTitle.field = title
> NO.stdWrap.wrap =<img
> src="/fileadmin/templates/graphics/nav/|.gif" />
> NO.wrapItemAndSub =<li>|</li>
>
> ACT = 1
> ACT.ATagTitle.field = title
> ACT.stdWrap.wrap =<img
> src="/fileadmin/templates/graphics/nav/|_h.gif"
> class="active"/>
> ACT.wrapItemAndSub =<li>|</li>
>
> }
>
> again, just seeing alot of |'s
>
> the concrete example is http://www.usarps.com - there
> is a menu that runs across the top - it's simple
> graphic links with roll overs - i can see from the TS
> code above that it can define the active current page
> by adding "class="active"" to the link - however -
> where on earth is it getting all the links from? ie:
>
> <a href="about-rps/history/" title="About RPS"
> onfocus="blurLink(this);"><img
> src="/fileadmin/templates/graphics/nav/About RPS.gif"
> alt="" /></a>
>
> that line has to be set somewhere - it takes that and
> inserts it between <li></li> and then between
> <ul></ul> to create the menu - i understand the
> principle of what is happening - i just can find that
> stupid line of code - it has to exist somewhere - i
> just need to remove one of the menu items - i've even
> download all 800 million files from the server and
> used dreamweaver to query every single one of them for
> anything remotely like that (granted some didn't make
> it cause file names where too long, and knowing my
> luck it'll be one of those) - i've also used the
> search tool in TYPO3 to search for anything resembling
> that HTML - it does find one reference, the SHOP which
> has it's own Menu definded quite clearly in the SETUP
> section of it's template (not sure why he made a
> seperate template, but he did), so i could remove the
> menu item in question quite easily from that page


Listen carefully:

1. That HTML exists NOWHERE in your site except in the page cache.
It's assembled at runtime by the CMS--this is the point of a CMS.

2. The "|" is a PLACEHOLDER

3. The lines of code that is producing the code you keep referring to
are this one:

NO.stdWrap.wrap =<img src="/fileadmin/templates/graphics/nav/|.gif" />

...and this one (depending on menu state):


ACT.stdWrap.wrap =<img src="/fileadmin/templates/graphics/nav/|_h.gif"
class="active"/>


> so i don't know what else to say - everything i find
> in reference to menuHeader is using | as the content -
> it seems very cirular -


It IS circular ;-) An HMENU is basically a loop. It loops through all
of the pages available to it and inserts data wrapped in various
markup as specified in the TS code above. Read through the .stdWrap
sections of the TSref and TS By Ex to see what I mean [1].

No, for your specific question: you want to remove a menu item, right?
Find the uid for that menu item (mouse over the relevant page icon in
the BE to find out), and add this line to your TS template:

lib.menuHeader.excludeUidList = {comma-separated list of the uids of
the pages you wish to exclude from the menu}

OR

Left click on the icon of the page in question, choose "Edit page
header." In the resulting form, check the "Hide in menu" box.

-- 
Christopher Torgalson
http://www.typo3apprentice.com/

[1] http://typo3.org/documentation/document-library/core-documentation/doc_core_tsbyex/0.0.16/view/4/1/


More information about the TYPO3-english mailing list