add a graphic symbol

Feed 2 posts, 2 voices

Avatar
6 posts

I was wondering how can I add a graphic symbol like “>” in front of title (to be part of link)


<ul id="navsub">
<?php foreach ($this->children() as $child): ?>
    <li><?php echo $child->link($child->title, (url_start_with($child->url) ? ' class="navsub-current"': null)); ?></li>
<?php endforeach; ?>
</ul>

The final result should be:

<ul id="navsub">
    <li><a href="http://domain.com/page"> > Page </a></li>
</ul>

Thanks!
 
Avatar
1493 posts

Adjust the <li>...</li> line to read this way:

<li><?php echo $child->link(' > '.$child->title, (url_start_with($child->url) ? ' class="navsub-current"': null)); ?></li>

That should do it.

 
Avatar
6 posts

Thank you David!!!