Page 1 of 1

Second content not working

Posted: Fri Sep 23, 2016 7:49 pm
by Robmichiels
Hello dear forum members.

I followed this tutorial:
https://docs.cmsmadesimple.org/layout/d ... e-template

I cannot seem to get the second content to work

Code: Select all

{strip}
{process_pagedata}
{content block='second_content' assign='second_content' label='My second content block'}
{/strip}<!doctype html>
<__html lang="{cms_get_language}">
  <head>
    <title>{title} - {sitename}</title>
    {metadata}
    {cms_stylesheet}
  </head>
  </__body>
<div class="top-bar">
  <div class="container">
    <a href="{root_url}"><img id="logo" src="{root_url}/uploads/images/logo.png" /></a>
  </div>
</div>
<div class="navbar-wrapper">
  <div class="container">
    {Navigator}
  </div>
</div>
<div class="clearfix"></div>
<div class="banner" style="height: 300px">
  <img id="banner-img" src="{root_url}/uploads/images/banner.png" />
</div>
<div class="break-line"></div>
<div class="content-wrapper">
  <div class="content container">
    {content}
  </div>
  <div class="second-content container">
      {$second_content}
  </div>
</div>
<div class="break-line"></div>
<footer>

</footer>
  <__body>
</__html>
In the admin panel I can add second content but its not displaying in the frontend

Re: Second content not working

Posted: Fri Sep 23, 2016 8:54 pm
by Rolf
Is related to Smarty scope, read this tutorial
http://www.cmscanbesimple.org/blog/smar ... e-examples
The docs still needs to be updated with this info...

Re: Second content not working

Posted: Sat Sep 24, 2016 7:45 am
by Robmichiels
Works like a charm :)

Thanks Rolf!