[Typo3] TMENU wrapProblem

Christopher bedlamhotel at gmail.com
Wed Jul 20 16:43:43 CEST 2005


Hi,

On 20/07/05, matthi <matthibcn at gmail.com> wrote:
> Hi list,
> 
> this subject is driving me nuts and after experimenting with all the
> diferent wrapTypes, as far as I know them, i still don´t get the desired
> result, but I think there MUST be a way to archieve it:
> 
> So, this is the html-code for the menu:
> 
> <div class="menu">
>    <dd><a href="#"><span class="aa">&nbsp;</span><span class="bb">Menu
> item 1</span><span class="cc">&nbsp;</span></a></dd>
> </div>
> 
> As you might see, the a-tag is wrapping the whole stuff
> 
> parsing it through TYPO3 I am faced with something like this:
> 
> <div class="menu"><dd><span class="aa">&nbsp;</span><span class="bb"> <a
> href="index.php?id=1" onfocus="blurLink(this);">Home</a> </span><span
> class="cc">&nbsp;</span>
> 
> That makes sense, as TYPO3 ignores the original a-tag and wraps its own
> around the | in the TMENU TScode....
> 
> But the result is something completly different from the original
> idea..to implement a normal css-tabMenu...even if it looks the same, the
>   link is active only within the a-tag and so is the hover-state, for
> sure...
> 
> No doubt I could make the whole thing a GEMNU or something similar, but
> why should I as I dont like JS at all and try to useit at the minimum
> and can get the same "effect" with just pure css, at least outside
> TYPO3, not to mention that I am dealing with just one image in the css
> variation meanwhile I would have x of them using the GMENU approach
> 
> Now I am looking for a way I can tell "him" that he wraps the a-tag
> around my spans...or bring them back in after wrapping or however it
> makes sense to TYPO
> 
> Hope someone did that / something similar before as I am running out of
> variations to test....

Could you describe what you're trying to achieve (better: post a link
to an example)? The markup you're trying to achieve is kind of strange
(all those spans, <dd>, but no <dl> or <dt> elements, etc...) I'd
guess what you're trying to do could be done with just a single <a>
element in the <dd>.

In the meantime, you should have a look at the 'doNotLinkIt' property
of TMENU and the stdWrap properties 'preCObject', 'postCObject' and
'dataWrap' [1]. With these you should be able to a) remove the
automatic link, and b) build your own link & other markup. This
subject has also come up before - it should be in the list archive
somewhere.


-Christopher



[1] http://typo3.org/documentation/document-library/doc_core_tsref/stdWrap/



More information about the TYPO3-english mailing list