[TYPO3-english] Spacers and other beginner questions

Marian Schedenig m.sched at gmx.at
Sun Jun 21 14:44:49 CEST 2009

Jigal van Hemert wrote:

> Spacers are indeed meant for making seperators. In TSRef you can read
> [1] that:
> Spacers are pages of the doktype "Spacer". These are not viewable pages
> but "placeholders" which can be used to divide menuitems.

Which is exactly what I want. :)

> For example:
> 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.

Do I perhaps have to add some include to my template I don't know about?

> AMENU is short for "Archive MENU", so in fact you *are* using the
> archive :-)

Yes, I'm aware of that - though I probably should have pointed it out. :)

> The manual of tt_news [2] tells that a LATEST element
> "lists only non-archived new-records, and it is not influenced by the
> archive menu selection. (This behaviour can be changed by setting
> “displayArchivedInLatest” to 1 -> then LATEST will act like a normal
> LIST)"

Ah! I was digging around in the archive sections of the docs, so I was aware 
that LIST generally ignores the archive settings, but didn't see the bit 
about LATEST - seems to work fine now!

>> Below each blog comment, I want to display something like:
>> Posted by Musgit on Saturday, May 9th, 2009 at 04:52 in Blog Test, Sub 2
> TYPO3 does not like to show visitors links to pages which are not
> accessible and does not like to show empty links. So if you let TYPO3
> build the links for you (i.e. you do not code the <a href stuff
> yourself) it will simply not render a link if that field is empty.

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> 

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. :)

Thanks a lot,

Hofstadter's law: "It always takes longer than you think,
even when you take account of Hofstadter's law".

More information about the TYPO3-english mailing list