News:

Support the VirtueMart project and become a member

Main Menu

category name outside the category page

Started by marvays, March 24, 2021, 09:38:35 AM

Previous topic - Next topic

marvays

Hi. I've been solving a problem for a long time and I don't know what to do. therefore please help.

I need to display the VM category name in the module.

So I will remove the category page from the code:
<?php if (!empty($this->category->category_name)) { ?>
<h1><?php echo vmText::_($this->category->category_name); ?></h1>
<?php ?>


And I have to edit it and display it in my own module. How?

pinochico

#1
We develop own custom VM Category Header module and add above category view after hidden category name in category view:

Look at this:
https://www.archivbox.cz/archivace-papirovych-dokumentu
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

marvays

Quote from: pinochico on March 24, 2021, 10:14:01 AM
We develop own custom VM Category Header module and add above category view after hidden category name in category view:

Look at this:
https://www.archivbox.cz/archivace-papirovych-dokumentu


Where i can buy it? I didn't find it on your e-shop. Alternatively, I'll buy a piece of code that I need to incorporate into mod_Breadcrumbs

<?php
defined
('_JEXEC') or die;

JHtml::_('bootstrap.tooltip');

$app        JFactory::getApplication();
$menuitem   $app->getMenu()->getActive(); // get the active item
//$m_params   = $menuitem->params; // get the params Menu
//$page_title = $m_params->get('page_title','');
$arr_list = (array) $list;
$end_list end($arr_list);
?>

<div class="navigace">
    <h1 class="navigace-title"><?php  echo $end_list->name?></h1>
    <ul itemscope itemtype="https://schema.org/BreadcrumbList" class="navigace<?php echo $moduleclass_sfx?>">
        <?php if ($params->get('showHere'1)) : ?>
            <li>
                <?php echo JText::_('MOD_BREADCRUMBS_HERE'); ?> 
            </li>
        <?php else : ?>
            <li class="active">
                <span class="divider icon-location"></span>
            </li>
        <?php endif; ?>

        <?php
        
// Get rid of duplicated entries on trail including home page when using multilanguage
        
for ($i 0$i $count$i++)
        {
            if (
$i == && !empty($list[$i]->link) && !empty($list[$i 1]->link) && $list[$i]->link == $list[$i 1]->link)
            {
                unset(
$list[$i]);
            }
        }

        
// Find last and penultimate items in breadcrumbs list
        
end($list);
        
$last_item_key   key($list);
        
prev($list);
        
$penult_item_key key($list);

        
// Make a link if not the last item in the breadcrumbs
        
$show_last $params->get('showLast'1);

        
// Generate the trail
        
foreach ($list as $key => $item) :
            if (
$key != $last_item_key) :
                
// Render all but last item - along with separator ?>

                <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
                    <?php if (!empty($item->link)) : ?>
                        <a itemprop="item" href="<?php echo $item->link?>" class="pathway"><span itemprop="name"><?php echo $item->name?></span></a>
                    <?php else : ?>
                        <span itemprop="name">
<?php echo $item->name?>
</span>
                    <?php endif; ?>

                    <?php if (($key != $penult_item_key) || $show_last) : ?>
                        <i class="fa fa-angle-right"></i>
                    <?php endif; ?>
                    <meta itemprop="position" content="<?php echo $key 1?>">
                </li>
            <?php elseif ($show_last) :
                
// Render last item if reqd. ?>

                <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem" class="active">
<span itemprop="name">
<?php echo $item->name?>
</span>
                    <meta itemprop="position" content="<?php echo $key 1?>">
                </li>
            <?php endif;
        endforeach; 
?>

    </ul>
</div>

pinochico

www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products