Is it possible to show the parent category as the title (h1) of the page in the pages that display the different categories of a parent category ?
I can't find it.
Joomla 3.7.2 / Virtuemart 3.2.2
Thanks!
Catherine
See http://demo.virtuemart.net/wear - the parent category title is shown under the search/sort block using this code:
<h1><?php echo vmText::_($this->category->category_name); ?></h1>
If you want to move the locateion then edit and override components/com_virtuemart/views/category/tmpl/default.php - or if already using overrides then edit the relevant override file.
Yes, I found it, thanks a lot !
Quote from: jenkinhill on May 30, 2017, 12:55:20 PM
See http://demo.virtuemart.net/wear - the parent category title is shown under the search/sort block using this code:
<h1><?php echo vmText::_($this->category->category_name); ?></h1>
If you want to move the locateion then edit and override components/com_virtuemart/views/category/tmpl/default.php - or if already using overrides then edit the relevant override file.
Holla. This solution dont work on J4 and VM4. Can you help me?
I oweride /templates/my_template/html/com_virtuemart/sublayouts/categories.php
<div class="category-view">
<?php if (!empty($this->category->category_name)) { ?>
<h1><?php echo vmText::_($this->category->category_name); ?></h1>
<?php } ?>
......
error: Using $this when not in object context
::)
$category->category_name
Quote from: marvays on October 14, 2022, 07:32:09 AM
Holla. This solution dont work on J4 and VM4. Can you help me?
I'm not surprised. That "fix" was posted for versions over 5 years ago!