[TYPO3] [solved] Re: valid GMENUs

Christian Vetter Christian.Vetter at dragoner-design.de
Wed Apr 19 14:55:21 CEST 2006


Hi Curt,
Until your answer it was still an issue - but the solution puts me to  
shame. Actually when I started with Typo3 around my second or third try in  
finding answers was to search the source, which usually just brought me  
back to using some fancy TypoScript - thus I searched the source less  
frequently, and now it obviously didn't even occur to me :(
But anyways, thanks for pointing me to the solution :)

Thank you very much,
Christian


Am 19.04.2006, 06:07 Uhr, schrieb Curt Grimley <curt at cgss.net>:

> Christian Vetter wrote:
>> Hi folks,
>> I want my web sites to be valid XHTML 1.1 - thus I can't have stuff like
>> 'border="0"' in my img-tags. How can I get rid of that for my
>> GMENU/Gifbuilder objects ? In the documentation I haven't found a thing
>> on that.
>> I use Typo3 4.0.
>>
>> Best regards,
>> Christian
>
> Hi Christian, good question... is it still an issue for you (two days
> later)?
>
> I found the border="0" is built in (typo3/tslib/class.tslib_menu.php,
> line 2245). Of course, you do not want to modify that file.
>
> But about ten lines later you see an opportunity to process the links
> using the IProcFunc user function feature (see TSRef).
>
> So I tried one and it works, like this:
>
> Typoscript (only pertinent lines shown):
>
> 	includeLibs.myproc = fileadmin/scripts/my_menuIProcFunc.php
> 	temp.mymenu = HMENU
> 	temp.mymenu.1 = GMENU
> 	temp.mymenu.1.IProcFunc = user_menuIProcFunc
>
> Php script file (fileadmin/scripts/my_menuIProcFunc.php):
>
> 	<?php
> 	function user_menuIProcFunc($I,$conf)   {
> 	        $I['parts'] = str_replace('border="0"','',$I['parts']);
> 	        return $I;
> 	}
> 	?>
>
> Now you just need to make sure your .css deals with the border attribute
> of img tags. Or if you want you could plug in style notation when you do
> the str_replace (above).
>
> Actually there are a lot of places in Typo3 that you can add your own
> functionality, just search TSRef for "function-name". Hope that helps!  
> ~cg



More information about the TYPO3-english mailing list