I want to access the variable in layout in zend framework, how can I do that. I searched a lot but can't find any thing useful or helpful for me. Below are the links that I already tried so admin please don't mark this question as duplicate one..
Thanks..
Zend Framework 2 - Layout and variable
access controller action variables to zf2 layout
Senario
I have a link in layout.phtml
that I want to display on conditional bases. Like some user of my sites cannot see that link but other can do. That condition comes from the databases that I have but I don't know how to access that in layout.phtml
Example
<?php if($this->check == true) {?><a href="#">This Link</a><?php } ?>
if $this->check == true
than show the link otherwise not.