php - How do i open a Prestashop 1.6.1.x Back office controller in a fancybox? -
i'm developing prestashop 1.6.1.x module has office settings page. page want have link index.php?controller=adminthemes , have open in modal/fancybox.
- how load fancybox js , css, can use class="fancybox" on link?
- how tokenize link?
- is possible link controller "naked", not including header, footer, , left menubar?
ps: want echo out in php, not smarty, if share both php , smarty-way, think helpful more people.
fancybox automatically loaded on every admin page.
basically need display simple link in page.
<a class="fancybox" href="{$link->getadminlink('adminthemes')}&litedisplaying=1">link description</a>
and add javascript
(function ($) { $(document).ready(function () { $('.fancybox').fancybox({ width: '90%', height: '90%', type: 'iframe', title: '' }); }); })(jquery);
$link->getadminlink('adminthemes')
will generate link page , appending &litedisplaying=1
tell controller load page content (without header, footer , menu).
and in javascript load page iframe fancybox. automatically read href anchor.
please don't echo out content php. have mvc structure reason.
Comments
Post a Comment