[TYPO3-english] Special content in submenu
Tyler Kraft
tyler.kraft at netefficiency.co.uk
Wed Oct 29 15:00:29 CET 2008
Hi
It's great, I've used it to build all kinds of things.
When you think about it slightly abstractly a menu is just a list of
records in the beginning. So using the stdWrap (and all tis different
properties, including the ability to return a list from a select) on the
'value' of the HMENU 'special' property you can load your menu with just
about any list of numbers. And then using the before and after
properties for menu items you can render just about anything you want,
from any table you want and in any layout you want, with any additional
functionality you want (eg javascript calls, etc)
And if you want your users to be able to use this menu you can even
define it into the sitemap/menu CType for them.
http://lists.netfielders.de/pipermail/typo3-english/2008-August/052080.html
hth
Daniel Calderini wrote:
> Hi,
>
> you're right, I needed to read more carefully...
>
> I never saw we can do that (in fact, I never needed that)! ;-)
>
> Thanks a lot!!
>
>
> Le 29/10/2008 12:30 :
>> Hi
>>
>> No that's not true, you need to read a bit more carefully ;-)
>>
>> It also accepts stdWrap! So you can then use any property of stdWrap,
>> and *it* has user functions and content objects. With this you've just
>> opened a door to being able to do almost anything you want.
>>
>> 1.ACT.after.cObject < plugin.tx_myplugin_pi1
>>
>> ( Or it might be 1.ACT.after.stdWrap.cObject < plugin.tx_myplugin_pi1 )
>>
>> You could even build a whole other COA there if you need to:
>>
>> 1.ACT.after.cObject = COA
>> 1.ACT.after.cObject.10 = HTML
>> 1.ACT.after.cObject.10.value = ...
>> 1.ACT.after.cObject.20 < plugin.tx_myplugin_pi1
>> 1.ACT.after.cObject.30 = CONTENT
>>
>> And then like that you could apply a if test to the COA
>> 1.ACT.after.cObject.if{
>> value = 7
>> equals.field=section_frame
>> }
>>
>> hth
>> Tyler
>>
>> Daniel Calderini wrote:
>>> Thanks for your answer.
>>>
>>> I tried to place the Plugin content in the after property with the
>>> following Typoscript:
>>>
>>> menu = COA
>>> menu {
>>> 10 = HMENU
>>> 10 {
>>> entryLevel = 1
>>> 1 = TMENU
>>> 1.wrap = <ul> | </ul>
>>>
>>> 1.NO = 1
>>> 1.NO.allWrap = <li class="off"> | </li>
>>> 1.ACT = 1
>>> 1.ACT.wrapItemAndSub = <li class="on"> | </li>
>>> 1.ACT.after < plugin.tx_myplugin_pi1
>>> }
>>> }
>>>
>>> And the result displayed is:
>>>
>>> <ul>
>>> <li class="off"><a>Page 1</a></li>
>>> <li class="on"><a>Page 2</a>USER</li>
>>> <li class="off"><a>Page 3</a></li>
>>> </ul>
>>>
>>> This is quite logical as the after property of TMENU only accepts
>>> HTML data type.
>>> http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/10/8/
>>>
>>>
>>> Is my Typoscript wrong or is there another way to do this?
>>>
>>>
>>>
>>> Le 28/10/2008 12:07 :
>>>> Hi
>>>>
>>>> You could use the after object of the menu item in the ACT state and
>>>> an if statement
>>>>
>>>> hope that helps
>>>> Tyler
>>>>
>>>>
>>>>
>>>> Daniel Calderini wrote:
>>>>> Hi list,
>>>>>
>>>>> I want to display the menu of the following page tree:
>>>>>
>>>>> - Page 1
>>>>> -- Subpage 1
>>>>> -- Subpage 2
>>>>> - Page 2
>>>>> - Page 3
>>>>> -- Subpage 3
>>>>>
>>>>> If "Page 1" is active, it will display a normal menu:
>>>>>
>>>>> - Page 1
>>>>> -- Subpage 1
>>>>> -- Subpage 2
>>>>> - Page 2
>>>>> - Page 3
>>>>>
>>>>> The same goes for "Page 3".
>>>>>
>>>>> Here is my problem: if "Page 2" is active, I want some special
>>>>> content (which comes from a plugin) to be inserted between "Page 2"
>>>>> and "Page 3"
>>>>>
>>>>> - Page 1
>>>>> - Page 2
>>>>> -- SOME CONTENT FROM PLUGIN
>>>>> - Page 3
>>>>>
>>>>>
>>>>> Is there a simple way to achieve this, or do I have to extend the
>>>>> tslib_menu class ?
>>>>>
>>>>> Thanks and regards
>>>>> Daniel Calderini
More information about the TYPO3-english
mailing list