Popup in Menu

Sometimes it is required to open a popup directly from the menu.

There is a way to get this to work with typoscript (and without any XCLASS).

 

A way is described here:

 

typoscript menu definition for popups

  1. #define temporär objects for typolink to page,
  2. # depending on pagesettings
  3. temp.popupLinkTypolink {
  4.   title.field=title
  5.   parameter.cObject=CASE
  6.   parameter.cObject {
  7.       key.field=tx_pageaspopup_aspopup
  8.       default=TEXT
  9.       default.field=uid
  10.       default.target.field=target   
  11.       1=TEXT
  12.       1.value={field:uid} {field:tx_pageaspopup_popupdimension}:{field:tx_pageaspopup_popupparams}
  13.       1.insertData=1
  14.    }
  15. }
  16. temp.menuPopupLinkStdWrap {
  17.   doNotLinkIt=1
  18.   stdWrap.typolink<temp.popupLinkTypolink
  19. }
  20.  
  21. # example use:
  22. lib.main-nav = HMENU
  23. lib.main-nav.wrap = <ul id="main-nav" class="menu-h">|</ul>
  24. lib.main-nav {
  25.   entryLevel = 0
  26.   1 = TMENU
  27.   1 {
  28.     NO < temp.menuPopupLinkStdWrap
  29.   NO {
  30.     allWrap = <li>|</li>
  31.     stdWrap.htmlSpecialChars = 1
  32.   }
  33.   ACT < .NO
  34.   ACT = 1
  35.   ACT {
  36.     allWrap = <li class="active">|</li>
  37.   }
  38.   }
  39. }
  40.  

 

Description

The linkgeneration in the menu is disabled (doNotLinkIt), instead a own typolink generation is used. The typolink is build as standard typolink popup, if the relevant properties are set in the pageheader. (by the use of a CASE object).

To get the new fields in the pageheader a simple extension can be installed:

 

 

 

Initiates file download download extension page_as_popup.

 

blog comments powered by Disqus
Last Tweets (follow)

blogroll