Skip to content

Display a page in a modal

Choose a tag to compare

@lenybernard lenybernard released this 22 Nov 21:23
· 0 commits to 2.1 since this release

Summary

As explaned in #681, It is usefull to render the page's content in ajax.
You can watch this humble video
http://gofile.me/2XcEH/RTl8pPSRn

Warning

If you were using https://github.com/Victoire/victoire/blob/2.1/Bundle/PageBundle/Helper/PageHelper.php#L426, you'll need to declare the modale you want to use and edit the triggerer links to set the wanted modal.

Things done

  • added a layout GET parameter to the PageController@showAction to force to use this layout
  • adding a way to define custom modal layouts
  • do LinkType listing this modal layout when choosing "modal" value for target
  • passed the layout parameter to the link generated by the vic_link extension

Upgrade

You need to execute the following SQL command to upgrade your database
UPDATE vic_link SET target = '_modal' WHERE target = 'ajax-modal'