Navigator and Page Title
Posted: Wed Mar 21, 2018 6:05 pm
Hi
I am trying to use the page title in a simple menu based on page images. I have tried the code below:
Everything works apart from accessing the Page Title. I've tried and
This is what generated:
You'll see the alt tag is empty and the first bit in the p tag is empty.
The guide isn't clear whether you can use page titles in navigation
$node->titleattribute -- Description, or Title attribute (title), if defined.
There isn't a specific mention of Page title in the nodes.
Probably really obvious, but I can't get there.
Thanks
I am trying to use the page title in a simple menu based on page images. I have tried the code below:
Code: Select all
{* image matrix navigation *}
{if !isset($depth)}{$depth=0}{/if}
{if isset($nodes)}{strip}
{foreach $nodes as $node}
<div class="content-image">
<img src='{$node->image}' alt='{$node->title}' >
<a href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}>
<p>{$node->pagetitle}<br>{$node->titleattribute}</p>
</a>
</div>
{/foreach}
{/strip}{/if}
Code: Select all
$node->pagetitle
Code: Select all
$node->title
Code: Select all
<div class="content-image"><img src='http://localhost:8888/ida/uploads/images/project_pages/test-image.jpg' alt='' ><a href="http://localhost:8888/ida/index.php?page=test-project"><p><br>Description</p></a></div>
The guide isn't clear whether you can use page titles in navigation
$node->titleattribute -- Description, or Title attribute (title), if defined.
There isn't a specific mention of Page title in the nodes.
Probably really obvious, but I can't get there.
Thanks