[solved] <?php if ($this->headline): ?> NOT SHOWING
I am trying to achieve this way of subnavigation as well.
This seems like a very good solution.
The only thing is, if I alter my mod_navigation.tpl according to the above it does not show up in my code.
The headline is not showing up at all.
Code:
<div class="<?php echo $this->class; ?> block"<?php echo $this->cssID; ?><?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>>
<?php if ($this->headline): ?>
<<?php echo $this->hl; ?>>
<?php echo $this->headline; ?></<?php echo $this->hl; ?>>
<?php endif; ?>
<?php echo $this->skipNavigation; ?>
<?php echo $this->items; ?>
<a name="<?php echo $this->skipId; ?>" id="<?php echo $this->skipId; ?>" class="invisible"> </a>
</div>
Is showing up in my source as:
As you can see no h1 in between mod_navigation class and the invisible class.
What am I leaving out? I just can't seem to solve it.
Re: <?php if ($this->headline): ?> NOT SHOWING
Perhaps a stupid question, but did you fill in a title with the module. And if you included the module anywhere else then in a page layout, then the headline might be overwritten so check that as well.
Less stupid question: does the original template work if you change only that??
Re: <?php if ($this->headline): ?> NOT SHOWING
Hey Vera,
Stupid questions do not exist! Thanks for looking into my 'problem'
I did add a headline in the module, then it indeed shows up.
I think I might have misunderstood what they are trying to achieve in this topic
I can indeed give the module a title and it will link to main_nav after altering the mod_navigation template as discussed in the topic mentioned above.
But this way I will have to make a seperate module for each page that has a subnavigation.
Not really a problem of course, but it would have been easier if the headline text is replaced by the page title.
Re: <?php if ($this->headline): ?> NOT SHOWING
Why don't you just remove the if statement and put the {{env::main_title}} in instead of this->headline.
So you'd get something like
instead of:
[solved] Re: <?php if ($this->headline): ?> NOT SHOWING
Hey Vera, thanks a lot!
I already figured it out, came back to the forum to post my solution. (same as yours)
Thanks heaps for your help!