Code: Select all
{if $staticpage_pagetitle ==''} {* this is not a static page *}
Code: Select all
{if $staticpage_pagetitle ==''} {* this is not a static page *}
Code: Select all
<li{if $staticpage_pagetitle == "about"} class="active"{/if}><a href="/blog/pages/about.html">About</a></li>
Code: Select all
{if !$staticpage_pagetitle or empty($staticpage_pagetitle)} {* proceed only if this is not a static page *} {/if}
Code: Select all
static Page page title: "{$staticpage_pagetitle}"; View: "{$view}"
YL wrote about this nearly 4 years ago, and I then suggested a solution at that time.Timbalu wrote:Could you give me a deeper hint why and how {$staticpage_pagetitle} should be available in entries.tpl?
It is not by default with 1.6.2 with Smarty 2 either.
Code: Select all
{if !$staticpage_pagetitle or empty($staticpage_pagetitle)} {* proceed only if this is not a static page *} {/if}
Not true IMHO, since debugging smartified vars does not have it at all (*), unless you tell me how you put entries.tpl into a staticpage. The issue with asking if $staticpage_pagetitle == '' before, was IMO in reason of Smarty 2 not being strict! It took a question regarding an non existent smarty var to happen true, when asking if its value was an empty string, I assume. Run {debug} on top of entries.tpl to see for yourself. If you ask to display Page page title: "{$staticpage_pagetitle}"; you get Page page title: ""; in both worlds, because it isn't delivered at all.Don Chambers wrote:Evaluating if it is empty is meaningless - it will always be empty if I cannot evaluate it correctly.