Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Removing category names under category image

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 05-31-2020, 09:57 AM
  razorbackrinds's Avatar 
razorbackrinds razorbackrinds is offline
 

Newbie
  
Join Date: May 2020
Location: Arkansas - USA
Posts: 5
 

Question Removing category names under category image

I am sure that this has probably been asked a thousand times so I will apologize in advance for my ignorance here.


Is it possible to remove the Category Name when there is an image for the category?


For example, in the attached image, I would like to remove the names of the categories as the category image states the name.
Attached Thumbnails
Click image for larger version

Name:	categories.png
Views:	497
Size:	121.0 KB
ID:	5505  
__________________
T. Patterson
Hog Wild Rinds, LLC
v 5.4.1.5
Reply With Quote
  #2  
Old 07-03-2020, 11:50 PM
 
Ed B. Ed B. is offline
 

X-Adept
  
Join Date: Apr 2016
Posts: 446
 

Default Re: Removing category names under category image

You need to override customer/subcategories/icons/body.twig
See https://devs.x-cart.com/getting_started/how-to-apply-design-changes.html#seeing-structure-of-specific-page for more.
__________________
X-cart 5.2.12, php 5.6
Ed from Grenoble, France
Reply With Quote
  #3  
Old 07-09-2020, 06:09 PM
 
siddharth.puri@wheelandba siddharth.puri@wheelandba is offline
 

Advanced Member
  
Join Date: Nov 2019
Posts: 66
 

Default Re: Removing category names under category image

I modified this in theme_tweaker/customer/subcategories/icons/body.twig

However I have not worked with version 5.4

{##
# Subcategories list (grid style)
#}

{% if this.getSubcategories() %}
<ul class="subcategory-view-icons subcategory-list grid-list clearfix">
{% for subcategory in this.getSubcategories() %}
{% if subcategory.hasAvailableMembership() %}
<li>
<a href="{{ url('category', '', {'category_id': subcategory.category_id}) }}">
<span class="subcategory-icon lazy-load">
{{ widget('\\XLite\\View\\Image', isBlurApplicable=true, image=subcategory.image, maxWidth=this.getIconWidth(), maxHeight=this.getIconHeight(), centerImage='1', alt=this.getAlt(subcategory.image)) }}
</span>
//MAKE MODIFICATION HERE
{% if this.category.name != 'NAME OF THE CATEGORY YOU WANT TO HIDE NAMES FOR' %}
<span class="subcategory-name">{{ subcategory.name }}</span>
{% endif %}
</a>
</li>
{% endif %}
{% endfor %}
{% for item in this.getNestedViewList('children') %}
<li>{{ item.display() }}</li>
{% endfor %}
</ul>
{% endif %}
{{ widget_list('subcategories.base') }}
__________________
Version 5.3.6.6
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:55 AM.

   

 
X-Cart forums © 2001-2020