Jump to content

IP.Pages: Parse Blocks That Take Parameters


Haku2

Recommended Posts

I've asked this several years ago when IP.Content was an actively supported product and I was told it wasn't possible at the time, but is it now possible to create parse blocks that take parameters? If so, how would I access the arguments in the blocks? It would really open up so much more possibilities and it would allow me to cut down on the number of blocks for such minor (sometimes major) variations of code.

Link to comment
Share on other sites

In 4.x you add a block to a page via

{block="key"}

It is not possible to pass in parameters to the block, however nothing stops you from doing something like this

{{$_SESSION['myparameter'] = 'something';}}
<!--In the block, you would then reference $_SESSION['myparameter'] and unset it when you are finished-->
{block="key"}

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...