[TYPO3] TMENU maxItems
Peter Klein
peter at umloud.dk
Mon Mar 26 10:09:21 CEST 2007
-- cut --
<?
function user_make_links($menuArr,$conf) {
while (list($k,$v) = each($menuArr)) {
if ($conf["parentObj"]->isItemState("CUR",$k)) break;
}
$p = floor($k/5)*5;
$ma = array();
for ($i=0;$i<5;$i++) {
$ma[$i]=$menuArr[$p+$i];
}
return $ma;
}
?>
-- cut --
--
Peter Klein/Umloud Untd
"Bas van der Togt" <b.vandertogt at profinit.com> skrev i en meddelelse
news:mailman.1.1174772227.6121.typo3-english at lists.netfielders.de...
> hmm i don't get this... can you give me an example?
>
> cheers,
> Bas
>
> Peter Klein schreef:
>> Hi Bas.
>> Write a small itemArrayProcFunc function that crops off the parts of the
>> menuaray you dont need.
>>
>> You can find some examples of itemArrayProcFunc functions in the
>> mailinllist archive:
>> http://support.typo3.org:8080/jive/isearch.jspa?advanced=false&searchQuery=itemArrayProcFunc+&=Search&searchKB=true&searchForums=true
>>
>> --
>> Peter Klein / Umloud Untd.
>>
>> "Bas van der Togt" <b.vandertogt at profinit.com> wrote in message
>> news:mailman.1.1174759051.7114.typo3-english at lists.netfielders.de...
>>> Hello list,
>>>
>>> I build a menu, see below. But now i want to show max 5 pages in the
>>> menu, two pages before the active item and two pages after.
>>>
>>> Exmaples:
>>> page4|page5|page6(active)|page7|page8
>>> page1(active)|page2|page3|page4|page5
>>>
>>> This is not possible with maxItems = 5. Cause than it's only showing the
>>> first 5 items. Does anybody knows a solution for this?
>>>
>>> cheers,
>>> Bas
>>>
>>> # ProductMenu
>>> temp.ProductMenu = HMENU
>>> temp.ProductMenu {
>>> wrap = <div class="prod-left"> </div>|<div
>>> class="prod-right"> </div>
>>> entryLevel = -2
>>> 1 = TMENU
>>> 1 {
>>> SPC = 1
>>> SPC.doNotLinkIt = 1
>>> expAll = 0
>>> NO {
>>> linkWrap = <div class="prod-no">|</div><div
>>> class="prod-spacer"> </div>|*|<div class="prod-no">|</div><div
>>> class="prod-spacer"> </div>|*|<div class="prod-no">|</div>
>>> }
>>> ACT < .NO
>>> ACT = 1
>>> ACT.linkWrap = <div class="prod-act">|</div><div
>>> class="prod-spacer"> </div>|*|<div class="prod-act">|</div><div
>>> class="prod-spacer"> </div>|*|<div class="prod-act">|</div>
>>> RO = 0
>>> }
>>> }
>>>
>>
More information about the TYPO3-english
mailing list