Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Look how the page is configured by TemplaVoila:</p> <pre><code>page = PAGE page.typeNum = 0 page.10 = USER page.10.userFunc = tx_templavoila_pi1-&gt;main_page page.shortcutIcon = {$faviconPath} </code></pre> <p>They call the <code>main_page</code> function of class <code>tx_templavoila_pi1</code> via page.userFunc:</p> <pre><code>/** * Main function for rendering of Page Templates of TemplaVoila * * @param string Standard content input. Ignore. * @param array TypoScript array for the plugin. * @return string HTML content for the Page Template elements. */ function main_page($content,$conf) { $this-&gt;initVars($conf); // Current page record which we MIGHT manipulate a little: $pageRecord = $GLOBALS['TSFE']-&gt;page; // Find DS and Template in root line IF there is no Data Structure set for the current page: if (!$pageRecord['tx_templavoila_ds']) { foreach($GLOBALS['TSFE']-&gt;tmpl-&gt;rootLine as $pRec) { if ($pageRecord['uid'] != $pRec['uid']) { if ($pRec['tx_templavoila_next_ds']) { // If there is a next-level DS: $pageRecord['tx_templavoila_ds'] = $pRec['tx_templavoila_next_ds']; $pageRecord['tx_templavoila_to'] = $pRec['tx_templavoila_next_to']; } elseif ($pRec['tx_templavoila_ds']) { // Otherwise try the NORMAL DS: $pageRecord['tx_templavoila_ds'] = $pRec['tx_templavoila_ds']; $pageRecord['tx_templavoila_to'] = $pRec['tx_templavoila_to']; } } else break; } } // "Show content from this page instead" support. Note: using current DS/TO! if ($pageRecord['content_from_pid']) { $ds = $pageRecord['tx_templavoila_ds']; $to = $pageRecord['tx_templavoila_to']; $pageRecord = $GLOBALS['TSFE']-&gt;sys_page-&gt;getPage($pageRecord['content_from_pid']); $pageRecord['tx_templavoila_ds'] = $ds; $pageRecord['tx_templavoila_to'] = $to; } return $this-&gt;renderElement($pageRecord, 'pages'); } </code></pre> <p>This function checks the current page or search trough the rootline (TSFE) for the configured page template. The script does not check any TypoScript settings at all so I suppose thats not supported by TemplaVoila right now.</p> <p>It should not be too hard extending this class with a custom function that will check some TypoScript settings.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload