[TYPO3-english] Spacers and other beginner questions

Jigal van Hemert jigal at xs4all.nl
Sun Jun 21 16:55:17 CEST 2009


Marian Schedenig wrote:
>> lib.menu = HMENU
>> lib.menu {
>>    1 = TMENU
>>    1 {
>>      NO {
>>        wrapItemAndSub = <div class="normal-menuitem">|</div>
>>      }
>>      SPC = 1
>>      SPC {
>>        wrapItemAndSub = <div class="spacer_menuitem">|</div>
>>        stdWrap.field = title
>>      }
>>    }
>> }
> 
> I tried it this way, hoping that perhaps not having specified the stdWrap 
> field was the problem. Still nothing - all other menu items are fine but the 
> spacers don't even contribute a single character to the resulting HTML code.

I first tried this piece of code before posting it, so I know for 
certain that it works.
These spacer pages don't happen to have the "Hide" option activated?

The test page tree looks like this:
+ O "root"
   +- [] Home ( -> first subpage)
   |   +- [] Home
   |   +- [] Single view for news
   |   +- ^v spacertitle
   |   +- [] Another page
   +- [=] Template storage
   +- [=] News items

And the menu it generates is:
<div class="normal-menuitem">
   <a href="index.php?id=7" onfocus="blurLink(this)">Home</a>
</div>
<div class="normal-menuitem">
   <a href="index.php?id=5" onfocus="blurLink(this)">Single view for 
news</a>
</div>
<div class="spacer_menuitem">spacertitle</div>
<div class="normal-menuitem">
   <a href="index.php?id=6" onfocus="blurLink(this)">Another page</a>
</div>

You have dubble checked the spelling of everything? (upper/lower case!)
Typoscript rather ignores everything it doesn't 'know'. It's a 
declarative language and it gladly accepts any property because it may 
be used by some other code in the system.

> Makes sense. I obviously shouldn't put it in my ve_guestbook HTML template 
> like this (my current solution to at least show *something*):
> 
> Posted by <a href="###GUESTBOOK_HOMEPAGE_URL###">###GUESTBOOK_SURNAME###</a> 
> on ###GUESTBOOK_DATE###
> 
> I suppose the correct way to do it is to put a stdWrap around the 
> ###GUESTBOOK_SURNAME### field (either that, or create a new field with the 
> link stdWrapped around the content of ###GUESTBOOK_SURNAME###) in my site's 
> template setup - what I don't know is how I can do that. :)

I took a quick look in the ve_guestbook code, but it has no support for 
a stdWrap on GUESTBOOK_SURNAME (and many other fields). There are some 
fields with stdWrap support, but for some reason the other hasn't done 
that for all markers.
You can always contact the author and ask him to add this (it's actually 
very little work and in my opinion it's something an extension author 
should provide on all fields)

-- 
Jigal van Hemert.


More information about the TYPO3-english mailing list