News:

Looking for documentation? Take a look on our wiki

Main Menu

How To hide category TITLE in virtuemart 3.6.10 JOOMLA

Started by confectionery, May 08, 2020, 16:05:29 PM

Previous topic - Next topic

confectionery

Hi
can anybody shed some light on how to hide the category title.  I am currently using joomla v.9.1 an virtuemart 3.6.10. My website is not live yet. For the life of me I cannot find where to hide the title.
can anybody help? Just in case I have confused myself, i have attached an image of what I would like to remove.
much appreciated

pinochico

It looks like the h1 caption from the menu and not the category caption.

I adjust it by setting the menu item or using the override in the template:

templates / OUR_TEMPLATE / html / com_virtuemart / category / default.php
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

GJC Web Design

either remove it in an over ridden template file or hide it by css

over ride then remove

components\com_virtuemart\views\category\tmpl\default.php

<?php if (!empty($this->category->category_name)) { ?>
<h1><?php echo vmText::_($this->category->category_name); ?></h1>
<?php } ?>

or hide

.browse-view h1 {
display:none;
}
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

confectionery

Thank you for the quick response. Trust me to get it wrong :)
will give both bash
tks

confectionery


pinochico

I'm sorry, but I don't have enough information from you to continue.

It will definitely help
- attach a code listing using the Inspect Element
- attach the settings of the Preventions Pack menu item
- list files in your template / html / com_virtuemart / category folder if any
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

confectionery

Thank you for spending time on this. You kinda lost me on the last request... :) but attached is what I understood

pinochico

Im not lost :)

You didn't do what I or GJC wrote.


  • no override is created in the template for the default file and there is no commented line for H1 (as I wrote or GJC)
  • I do not see the checked setup of the menu in your pdf - TAB Page Display item

In addition, I see on pdf hidden important information - you are using the HELIX framework and as you can see on the menu item it uses its own TAB to set the Helix Page Title

1. Create an override according to the rules of creating a Joomla override view:
https://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core

and create it for the file
components \ com_virtuemart \ views \ category \ tmpl \ default.php

-> place in a folder

templates / OUR_TEMPLATE / html / com_virtuemart / category / default.php

NOT IMPLEMENTED

2. Edit the line in the code and comment out the H1 view in the category view default template
(as I sent in the attachment)

NOT IMPLEMENTED

avoid displaying H1 title, but you will have bad SEO (every page must have H1) But that was not your request.

3. Check the menu item and TAB Helix Page Title settings (I don't know setup for this TAB).
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

pinochico

Quoteattach a code listing using the Inspect Element

The H1 is calling from category template Default.
There is nothing for setup from VM admin configuration.

Only



if (!empty($this->products)) { // if exist any products in this category
?>
<div class="orderby-displaynumber">
<div class="pull-left vm-order-list">
<?php echo $this->orderByList['orderby']; ?>
<?php //echo $this->orderByList['manufacturer']; ?>
</div>

<div class="pull-right display-number"><span class="hidden-sm hidden-xs"><?php echo $this->vmPagination->getResultsCounter ();?></span><?php // echo $this->vmPagination->getLimitBox ($this->category->limit_list_step); ?></div>


<div class="clearfix"></div>
</div> <!-- end of orderby-displaynumber -->

<?php // Then show Category name as H1 ?>
<h1><?php echo vmText::_($this->category->category_name); ?></h1>
<?php ?>


You must comment this line as I wrote or send in attachment
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

Studio 42

confety, you should not remove the H1 if you have not another one in this page because SEO.
Better add some css if it's too big.

pinochico

patrick:
Quoteconfety, you should not remove the H1 if you have not another one in this page because SEO.

Thank you Patrick, you're right, just as I wrote before.


If you remove H1, you will create bad SEO for this site. For proper SEO, you can use several ways.

Ffor example, instead of the name of the category, which you can hide with php or css, you can make the name of the menu item visible.
Or you can use a module to display your own name (for example, from Joomlart - MassHead Module or from MiniJoomla - VM Category Title Module.)

I think there would be other options, depending on why you want to hide the category name.
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

confectionery

Hi Guys, thank you both for the detailed help and steps.

I did do some if them and then undid.it when I thought it did not work. But I clearly did not.read it properly. Sorry about that.

So if I understand correctly. If I hide the h1, it will affect my so. Perhaps then I should just make it a lot smaller an I did not like the position, it would have been better if it was above the description

Once again a big thank you

AH

So yes - just move it above description and change size using CSS

<h1><?php echo vmText::_($this->category->category_name); ?></h1>


You should be able to target specifically the category description <h1> in css so that all other pages are unchanged
Regards
A

Joomla 3.10.11
php 8.0