anchor in blog for subnavigation

33 views
Skip to first unread message

Алексей Бочагов

unread,
Feb 24, 2018, 12:10:22 PM2/24/18
to Joomla! CMS Development
in order to make a navigation menu inside the blog

/components/com_content/views/category/tmpl/blog.php
in the line before " echo $this - >loadTemplate('item')");"

if ($this->params->get ('show_anchors', 1)) echo '<a name=''.$item - >alias.'"></a>";

also add the parameter " show_anchors"

it is perfect for landing pages

Also ideal for Bootstrap Affix subnavigation

And of course, the module displays a menu to navigate through this blog

Angie Radtke

unread,
Mar 14, 2018, 12:13:50 PM3/14/18
to Joomla! CMS Development
Hi,

you can use the template-overrides and add an id to  the  wrapping element  :

<div  id="article-<?php echo $counter; ?>" class="item column-<?php echo $rowcount; ?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?>"
   itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
   <?php
   $this->item = &$item;
   echo $this->loadTemplate('item');
   ?>
</div>


Greetings Angie


Reply all
Reply to author
Forward
0 new messages