Version 2, last updated by JohnBell at 23 Mar 15:16 UTC
Writing templates
1 Template shortcuts
In the view's template you can use some handy shortcuts:
| @helper( | expands to: | $this->loadHelper( |
| @date( | expands to: | $this->loadHelper(\'date.format\', |
| @overlay( | expands to: | $this->loadHelper(\'behavior.overlay\', |
| @text( | expands to: | JText::_( |
| @template( | expands to: | $this->loadIdentifier( |
| @route( | expands to: | $this->getView()->createRoute( |
| @escape( | expands to: | $this->getView()->escape( |
2. @overlay
@overlay will generate an AJAX call to insert a pager after loading.
Usage:
<?= @overlay(array('url' => @route('view=contains&parent_id='.$part->id.'#xp-contains'))); ?>
the #tag at the end of the url is the container id that the page is loaded into.
The url can contain any valid url. The retrieved url must have a container with the same id as the #id at the end of the url.e.g.:
<div id="xp-contains">... </div>
or
<table ... id="xp-contains"> ... </table>