Answer the question
In order to leave comments, you need to log in
Where in Joomla menu links are displayed, in what file?
Hello to all web knights!
I want to make micro-markup for the site, namely, add the itemprop attribute for menu links.
Found where they are displayed
. They are in the mod_menu folder, the default.php file.
But there are no links there.
Found where these links are requested. This is a line in the default_component.php file in the same folder, namely the line:
echo JHtml::_('link', JFilterOutput::ampReplace(htmlspecialchars($item->flink, ENT_COMPAT, 'UTF-8', false)) , $linktype, $attributes);
But where the code is located is still unknown. I've already searched through all the files on the site, but if you search through "href" or < a > (without spaces), then there are too many files.
Please help me find the file where the menu links are displayed.
Answer the question
In order to leave comments, you need to log in
Read here , it seems that you need to register your attribute in the default_url.php file.
the default.php file can be rewritten like this
<?php
defined('_JEXEC') or die;
$menu = JFactory::getApplication()->getMenu();
?>
<ul>
<?php foreach ($list as $i => &$item): ?>
<li><a href="<?php echo $item->flink;?>"><?php echo $item->title;?></a></li>
<?php endforeach;?>
</ul>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question