Fork me on GitHub

Sharing data between maincontent and a block  Bottom

  • I would like to be able to share data between the maincontent area and a block.
    Specifically, I have a block that should display specific information for some Pagesetter documents (either by pid or a relation field, I'm not sure which yet), otherwise it will determine it's own content.

    Is there any way to do this ?

    Thinking broadly: Since $maincontent is a variable and blockposition is a plugin, the maincontent should be run and assigned by the time the blocks are. Where could I stash data from a Pagesetter template to be read by a block on the same page ?
  • To answer myself, I solved this using session variables. I used the pnsessionsetvar pnRender plugin to save the value, then made a modified Pagesetter pub block to read it.

This list is based on users active over the last 60 minutes.