[TYPO3-english] HMENU as if on other page

Tyler Kraft tyler.kraft at netefficiency.co.uk
Mon Jul 20 10:41:13 CEST 2009


> Tyler,
> 
> you aren't limitted to link pages. It's possible to link from other 
> tables and if it's required you can combine /manipulate HMENU with a 
> self defined php-function.
> Have a look at the TS-Setup of the "commerce"-Extension and the included 
> function.
> 
> The cases you and Rudy described are possible with these options I 
> think. Furthermore it's posssible to define constants at global place to 
> set constant links.
> 
> Regards
> David

Hi David

I understand what you are saying and I appreciate you trying to help. 
And I pretty sure that I really do understand exactly what is capable 
with userfunc and
stdwrap and menus, etc as in the past I've built some overly complex 
structured menus that do more than just link to pages. I honestly don't 
believe this one can be done very easily (if at all) with stdWrap and 
user functions - they simply won't accomplish what I need to do afaik.

But I'm happy to be proven wrong! :-)

So here you go, have a shot at it:

The site has approximately 2000 pages that go various depths (in some 
cases 8 or 9 levels deep), and one of the features on it is that the 
client can list events. We've built a events plugin for them, and the 
plugin has a sysfolder where events and event categories are stored.


The client can then place the plugin on any page, at any depth on the 
site and in any place they want, and choose a category and the FE output 
will be a listing on events that are within the selected category and 
meet other specific conditions (all set via the page plugin). When 
clicking the link from the FE listing you are directed to one specific 
page and shown the event details. All instances of the plugin go to this 
one page. In the link we pass a get variable that says what the previous 
page id that you just came from is.

So based upon this get variable for the last page id all the navigation 
on the site has to reflect and be the same as if you were on the 
previous page. For the top navigation this can be easily accomplished 
using some conditions in the TS. For the breadcrumb navigation this can 
be accomplished with a simple php function. The part that I'm at a loss 
to mimic is the left hand navigation. The Ts for the left hand menu is 
below, and it is in a works 100% atm.


temp.lhnav = HMENU
temp.lhnav {
   wrap = <div id="lhnav"><div id="ilhnav">|<div 
class="navtlc"></div><div class="navtrc"></div><div 
class="navblc"></div><div class="navbrc"></div></div></div>
   entryLevel = 0

   1 = TMENU
   1{
     noBlur = 1
     wrap = <ul>|</ul>
     NO.doNotLinkIt = 1
     NO.doNotShowLink = 1

     CUR = 1
     CUR.stdWrap.htmlSpecialChars = 1
     CUR.stdWrap.field = nav_title//title
     CUR.stdWrap.wrap = <span>|</span>
     CUR.wrapItemAndSub = <li>|</li>
     CUR.doNotLinkIt = 1
     CUR.linkWrap = <span class="cur">|</span>

     ACT = 1
     ACT.ATagParams = class="act"
     ACT.stdWrap.htmlSpecialChars = 1
     ACT.stdWrap.field = nav_title//title
     ACT.stdWrap.wrap = <span>|</span>
     ACT.wrapItemAndSub = <li>|</li>
   }

   2 = TMENU
   2{
     noBlur = 1
     wrap = <ul>|</ul>

     NO = 1
     NO.doNotLinkIt = 1
     NO.doNotShowLink = 1
     NO.wrapItemAndSub >

     CUR = 1
     CUR.stdWrap.htmlSpecialChars = 1
     CUR.stdWrap.field = nav_title//title
     CUR.stdWrap.wrap = <span>|</span>
     CUR.wrapItemAndSub = <li>|</li>
     CUR.doNotLinkIt = 1
     CUR.linkWrap = <span class="cur">|</span>

     ACT = 1
     ACT.ATagParams = class="act"
     ACT.stdWrap.htmlSpecialChars = 1
     ACT.stdWrap.field = nav_title//title
     ACT.stdWrap.wrap = <span>|</span>
     ACT.wrapItemAndSub = <li>|</li>
   }

   3 < .2
   4 < .3
   4{
     NO.stdWrap.htmlSpecialChars = 1
     NO.stdWrap.field = nav_title//title
     NO.stdWrap.wrap = <span>|</span>
     NO.wrapItemAndSub = <li>|</li>
     NO.doNotLinkIt = 0
     NO.doNotShowLink = 0
   }

}

[treeLevel=1]
   temp.lhnav.2{
     NO.stdWrap.htmlSpecialChars = 1
     NO.stdWrap.field = nav_title//title
     NO.stdWrap.wrap = <span>|</span>
     NO.wrapItemAndSub = <li>|</li>
     NO.doNotLinkIt = 0
     NO.doNotShowLink = 0
   }

[treeLevel=2]
   temp.lhnav.3{
     NO.stdWrap.htmlSpecialChars = 1
     NO.stdWrap.field = nav_title//title
     NO.stdWrap.wrap = <span>|</span>
     NO.wrapItemAndSub = <li>|</li>
     NO.doNotLinkIt = 0
     NO.doNotShowLink = 0
   }
[global]





More information about the TYPO3-english mailing list