Here is my solution (The previous one was wrong but I let it for informal/logical purpose about the answers I got)
Instead of going into ZfcUser after login I have route the request to ZfcDataGrid. To do that simply edit the UserController.php on ZfcUser/Controller/ and modify indexAction to looks like:
if (!$this->zfcUserAuthentication()->hasIdentity()) {
return $this->redirect()->toRoute('zfcuser/login');
}
return $this->redirect()->toRoute('ZfcDatagrid');
Here we check if we are authenticated, if we are we go to ZfcDataGrid, if not we go to default zfcuser login.
On my Data file I used this: (on ZfcDataGrid Data file provides the content used to render the grid)
$sm = $this->getServiceLocator();
$this->newsTable = $sm->get('Application\Model\News');
$news = $this->newsTable->fetchAllToArray();
foreach ($news as $index=>$value) {
$data[$index] = $value;
}
return $data;
Then on my .phtml
<div name="zfcuser" style="position:relative; top:10px; left:80%;">
<div style="float:left; padding-right:16px;">
<?php echo $this->gravatar($this->zfcUserIdentity()->getEmail()) ?></div>
<h3><?php echo $this->zfcUserDisplayName() ?>!</h3>
<a href="<?php echo $this->url('zfcuser/logout') ?>">[Sign Out]</a>
<div style="clear:both;"></div>
</div>
<a class="btn btn-primary" href="<?php echo $this->url('ZfcDatagrid') ?>"
<?php echo $this->translate('cancelback') ?>
role="button" class="btn" data-toggle="modal">Cancel and back to previous page</a>
<?php
echo '
<h2>Title : ' . $new[0]['title'] . '</h2>'; ?>
<form method="post" action="somepage">
<textarea name="content" style="width:100%">
<?php echo '<p>' . $new[0]['content'] . '</p>
'?></textarea>
</form><a class="btn btn-primary" href="<?php echo
$this->url("news")."save";?>">
<?php echo $this->translate('Validate'); ?>
</a>
So the answer I found it's to use model you need on the other module controller (use Application\Model\NewsModel;) Then on the controller get the data from your model and pass the results to your view. Then on your view show the data.
If someone can tell me if it's the right way to do what I wanted or if needed more explanation feel free to ask.
Thanks again for your help Carlos, I really appreciate it.
Happy new year :D