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
- #define temporär objects for typolink to page,
- # depending on pagesettings
- temp.popupLinkTypolink {
- title.field=title
- parameter.cObject=CASE
- parameter.cObject {
- key.field=tx_pageaspopup_aspopup
- default=TEXT
- default.field=uid
- default.target.field=target
- 1=TEXT
- 1.value={field:uid} {field:tx_pageaspopup_popupdimension}:{field:tx_pageaspopup_popupparams}
- 1.insertData=1
- }
- }
- temp.menuPopupLinkStdWrap {
- doNotLinkIt=1
- stdWrap.typolink<temp.popupLinkTypolink
- }
- # example use:
- lib.main-nav = HMENU
- lib.main-nav.wrap = <ul id="main-nav" class="menu-h">|</ul>
- lib.main-nav {
- entryLevel = 0
- 1 = TMENU
- 1 {
- NO < temp.menuPopupLinkStdWrap
- NO {
- allWrap = <li>|</li>
- stdWrap.htmlSpecialChars = 1
- }
- ACT < .NO
- ACT = 1
- ACT {
- allWrap = <li class="active">|</li>
- }
- }
- }
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:
download extension page_as_popup.
