Inject active document to blocks (for related blocks)

Description

None

Technical tasks

None

Deployment actions

None

Activity

Show:
Ger Jan van den Bosch
November 19, 2015, 3:48 PM

I think the BlockRenderer should be refactored to BlockManager

Marijn Otte
November 20, 2015, 2:17 PM

Ger-Jan can you please add documentation (as comment or attached file) how to use this feature in a block?

Ger Jan van den Bosch
November 23, 2015, 11:21 AM
Edited

In the content (detail) controller the line $this->blockManager->setDocument($article); registers the active document.

To get the active document in the block you can pass the BlockManager to the BlockHandler constructor. In the execute function you can call $this->blockManager->getDocument(); to get the document.

Assignee

Unassigned

Client

None

Fix versions

Configure