1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-10 16:46:50 +02:00

Tablerender: Use uniqueIds to keep setContent() values intact.

This commit is contained in:
Cameron
2019-06-16 12:32:55 -07:00
parent 1cca064f0f
commit 1c7bc92a65
2 changed files with 31 additions and 10 deletions

View File

@@ -1231,10 +1231,12 @@ class news_front
$unique = $this->getRenderId();
$ns = e107::getRender();
$ns->setUniqueId($unique);
$ns->setContent('title', $news['news_title']);
$ns->setContent('text', $news['news_summary']);
$ns->setUniqueId(null); // prevent other tablerenders from using this content.
// TODO add 'image' and 'icon'?
$this->caption = $caption;
@@ -1851,9 +1853,9 @@ class news_front
}
$newsObj = new news_front;
$content = e107::getRender()->getContent(); // get tablerender content
//$content = e107::getRender()->getContent(); // get tablerender content
require_once(HEADERF);
e107::getRender()->setContent($content,null); // reassign tablerender content if HEADERF uses render.
//e107::getRender()->setContent($content,null); // reassign tablerender content if HEADERF uses render.
$newsObj->render();
if(E107_DBG_BASIC && ADMIN)
{
@@ -1935,4 +1937,4 @@ require_once(FOOTERF);
// =========================================================================
?>
?>