TMENU and stdWrap clarification

View: New views
8 Messages — Rating Filter:   Alert me  

Parent Message unknown TMENU and stdWrap clarification

by Kathryn Blair :: Rate this Message:

| View Threaded | Show Only this Message

Hi everyone,

This is a pretty ridiculous question but I think (according to the TSref) it
should work, but it isn't working when I try it, so here goes.

I want to use stdWrap to wrap a menu with something dynamic (really doesn't
matter what, so long as I can give them different ids). I checked the TSRef
for TMENU:
http://typo3.org/documentation/document-library/references/doc_core_tsref/4.
1.0/view/10/7/ -- and TMENU has a stdwrap property and refers you to an
example on the GMENU page
(http://typo3.org/documentation/document-library/references/doc_core_tsref/4
.1.0/view/10/4/):

2 = TMENU
2 {
  stdWrap.dataWrap = <ul class="{register :  parentProperty}"> | </ul>
  NO {
    ...
  }
}

... but this doesn't seem to work? Here's the first level of my typoscript
for the menu:

temp.menu_1 = HMENU
temp.menu_1.special=list
temp.menu_1.special.value.insertData=1
temp.menu_1.special.value={leveluid:1}
 # First level menu-object
temp.menu_1.1 = TMENU
temp.menu_1.1 {
  stdWrap.dataWrap=<ul class="{field:uid}"> | </ul>
  NO{
    allWrap.insertData=1
    allWrap={$otherliallwrap}
    wrapItemAndSub ={$menuliallwrapitemandsub}
    ATagTitle.field=title
    }
    #I made them the same for active items but I'll need to change this.
  ACT = 1
  ACT{
    allWrap.insertData=1
    allWrap= {$otherliallwrap}
    wrapItemAndSub= {$topmenuliallwrapitemandsub}
    ATagTitle.field=title
    }
  noBlur = 1
  expAll = 1
}

And the resultant HTML totally ignores the dataWrap -- no <ul> | </ul> tags
are written. As this is in the tsref as working I must be doing something
wrong, does anyone know what that might be?

Thanks a lot,

Kath

_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

Re: TMENU and stdWrap clarification

by Ron Hall-4 :: Rate this Message:

| View Threaded | Show Only this Message

Hi Kath,

I do not no if this is what you are looking for but setting  
subst_elementUid to 1 and using {elementUid} will give you a unique  
id. See following code for example:

globalMenu = HMENU
globalMenu.entryLevel = 0
globalMenu.wrap = <div id="globalMenuWrap"><ul id="globalMenu">|</
ul><!-- end #globalMenu  --><div id="globalMenuLeftCap"> </div></
div><!-- end #globalMenuWrap  -->
globalMenu.1 = TMENU
globalMenu.1 {
        noBlur = 1
        NO.before = <li id="globalMenuItem-{elementUid}">|*|<li  
id="globalMenuItem-{elementUid}">|*|<li id="globalMenuItem-
{elementUid}" class="last">
        NO.after = </li>
        NO.subst_elementUid = 1
        ACT < .NO
        ACT = 1
        ACT.before = <li id="globalMenuItem-{elementUid}" class="active">
        ACT.before = <li id="globalMenuItem-{elementUid}" class="active">|*|
<li id="globalMenuItem-{elementUid}" class="active">|*|<li  
id="globalMenuItem-{elementUid}" class="active last">
}

Ron Hall


On Aug 13, 2008, at 6:25 PM, Kathryn Blair wrote:

> Hi everyone,
>
> This is a pretty ridiculous question but I think (according to the  
> TSref) it
> should work, but it isn't working when I try it, so here goes.
>
> I want to use stdWrap to wrap a menu with something dynamic (really  
> doesn't
> matter what, so long as I can give them different ids). I checked  
> the TSRef
> for TMENU:
> http://typo3.org/documentation/document-library/references/doc_core_tsref/4 
> .
> 1.0/view/10/7/ -- and TMENU has a stdwrap property and refers you to  
> an
> example on the GMENU page
> (http://typo3.org/documentation/document-library/references/doc_core_tsref/4
> .1.0/view/10/4/):
>
> 2 = TMENU
> 2 {
>  stdWrap.dataWrap = <ul class="{register :  parentProperty}"> | </ul>
>  NO {
>    ...
>  }
> }
>
> ... but this doesn't seem to work? Here's the first level of my  
> typoscript
> for the menu:
>
> temp.menu_1 = HMENU
> temp.menu_1.special=list
> temp.menu_1.special.value.insertData=1
> temp.menu_1.special.value={leveluid:1}
> # First level menu-object
> temp.menu_1.1 = TMENU
> temp.menu_1.1 {
>  stdWrap.dataWrap=<ul class="{field:uid}"> | </ul>
>  NO{
>    allWrap.insertData=1
>    allWrap={$otherliallwrap}
>    wrapItemAndSub ={$menuliallwrapitemandsub}
>    ATagTitle.field=title
>    }
>    #I made them the same for active items but I'll need to change  
> this.
>  ACT = 1
>  ACT{
>    allWrap.insertData=1
>    allWrap= {$otherliallwrap}
>    wrapItemAndSub= {$topmenuliallwrapitemandsub}
>    ATagTitle.field=title
>    }
>  noBlur = 1
>  expAll = 1
> }
>
> And the resultant HTML totally ignores the dataWrap -- no <ul> | </
> ul> tags
> are written. As this is in the tsref as working I must be doing  
> something
> wrong, does anyone know what that might be?
>
> Thanks a lot,
>
> Kath
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english@...
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

Re: TMENU and stdWrap clarification

by Andreas Burg :: Rate this Message:

| View Threaded | Show Only this Message

Hi Kath,

I think you have to use dataWrap together with insertData
>   stdWrap.dataWrap = <ul class="{register :  parentProperty}"> | </ul>
stdWrap.insertData = 1

Andreas
_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

Re: TMENU and stdWrap clarification

by Tomas Mrozek :: Rate this Message:

| View Threaded | Show Only this Message

> I think you have to use dataWrap together with insertData

That's not what TypoScript reference says, is it?

"insertData - boolean - If set, then the content string is parsed like
.dataWrap above."

Tomas Mrozek
_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

Re: TMENU and stdWrap clarification

by Tomas Mrozek :: Rate this Message:

| View Threaded | Show Only this Message

> As this is in the tsref as working I must be doing something
> wrong, does anyone know what that might be?

I don't know what might be wrong but I have just tested simplified
version of your menu on TYPO3 4.1.5 and it works as expected.

temp.menu_1 = HMENU
temp.menu_1.special=list
temp.menu_1.special.value.insertData=1
temp.menu_1.special.value={leveluid:1}
temp.menu_1.1 = TMENU
temp.menu_1.1 {
   stdWrap.dataWrap=<ul class="{field:uid}">|</ul>
   NO{
     ATagTitle.field=title
     }
}

The menu is wrapped in <ul> with class set to UID of the page.

Tomas Mrozek
_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

Re: TMENU and stdWrap clarification

by Tyler Kraft-2 :: Rate this Message:

| View Threaded | Show Only this Message

Also I believe you need to preface the start of that class with a
letter. Starting with a number is disallowed I think.



Tomas Mrozek wrote:

>> As this is in the tsref as working I must be doing something
>> wrong, does anyone know what that might be?
>
> I don't know what might be wrong but I have just tested simplified
> version of your menu on TYPO3 4.1.5 and it works as expected.
>
> temp.menu_1 = HMENU
> temp.menu_1.special=list
> temp.menu_1.special.value.insertData=1
> temp.menu_1.special.value={leveluid:1}
> temp.menu_1.1 = TMENU
> temp.menu_1.1 {
>   stdWrap.dataWrap=<ul class="{field:uid}">|</ul>
>   NO{
>     ATagTitle.field=title
>     }
> }
>
> The menu is wrapped in <ul> with class set to UID of the page.
>
> Tomas Mrozek
_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

Re: TMENU and stdWrap clarification

by Andreas Burg :: Rate this Message:

| View Threaded | Show Only this Message

>> I think you have to use dataWrap together with insertData
>
> That's not what TypoScript reference says, is it?
>
> "insertData - boolean - If set, then the content string is parsed like
> .dataWrap above."
>
Sorry, you're right, I missunderstood this. Thank you.
_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

Re: TMENU and stdWrap clarification

by Andreas Burg :: Rate this Message:

| View Threaded | Show Only this Message

> Also I believe you need to preface the start of that class with a
> letter. Starting with a number is disallowed I think.

That's right, it mustn't begin with a number or a hyphen.

andreas
_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english