Jump to content

Double Category Title


CoderJim

Recommended Posts

I need to remove what appears to be a double category title (2001) as you can see in the photo, the larger is fine but the smaller is distracting and redundant plus it seems to add quite a bit of margin space, perhaps its something I did in admin/store settings but I don't think so. The breadcrumb is fine though, its not a double category or category/subcategory thing.

Foundation skin

Thanks

catpage.jpg

Link to comment
Share on other sites

Is the:

2001
2001

part of the drop-down area seen when hovering over "PDQ Archive by Year"?

Or is it the actual category name when viewing that category?

It looks like it is the name.

In the template content.category.php, near line 12, find:

<h2>{$category.cat_name}</h2>
{if isset($category.image)}
<div class="row">
   <div class="small-12 columns"><img src="{$category.image}" alt="{$category.cat_name}" class="marg-bottom"></div>
</div>
{/if}

If an <img> tag cannot display an image, then the browser will show the alt attribute value, which in this case is the name of the category. Then, if there is no alt attribute, then the browser should show the "broken picture" icon.

However, if there is no image, then you would think that {if isset(image)} would be false and the <div> block would not show.

The thing is, the skin is supposed to have, and show, a "no photo" default.

But, there is (must be) a bug in the admin code that does not allow for resetting the image for the category. That allows for a value to be in the CubeCart_category table, cat_image column that references a CubeCart_filemanager table file_id that does not exist.

Couple that with faulty logic in Catalogue->imagePath() that does not use the variable $defaults that, when true, will return that "no photo" image.

The quickest fix is to assign an image to the "2001" category. The second quickest is to use phpMyAdmin, look at the CubeCart_category table, and remove the 'cat_image' value for the "2001" category.

Link to comment
Share on other sites

I understand and tried this... using a dot_clear.gif (remember those) the small 2001 (above discussion) disappeared and looks cleaner, okay, so that fixes that on the month display page (subcategory), however, the main category while it does list ie: 2001 it also has a link/border box around the dot, two things, it would help to zero that border and increase the size of the text/link ie: 2001. See photo

dotbox.thumb.png.25c3fedf39d4c58c69ebeb4

Foundation skin

Thanks

Link to comment
Share on other sites

In content.category.php, find:

{if isset($SUBCATS) && $SUBCATS}
<ul class="medium-block-grid-6 text-center{if $CONFIG.catalogue_expand_tree ==1} show-for-medium-up{else} small-block-grid-3{/if}" data-equalizer>
   {foreach from=$SUBCATS item=subcat}
   <li data-equalizer-watch>
      <a href="{$subcat.url}" title="{$subcat.cat_name}">
      <img class="th" src="{$subcat.cat_image}" alt="{$subcat.cat_name}">
      </a>
      <a href="{$subcat.url}" title="{$subcat.cat_name}"><small>{$subcat.cat_name}</small></a>
   </li>
   {/foreach}
</ul>
{/if}

Change:
<img class="th" src="{$subcat.cat_image}" alt="{$subcat.cat_name}">
To:
<img style="border:none !important;" src="{$subcat.cat_image}" alt="{$subcat.cat_name}">

That removes the border and the other "th" class effects from all subcat images.

Note the <small> tags around the link contents. You can change that to <medium>. If you do that, you will need to create the CSS rule for it:

medium { font-size: 80%; line-height: inherit; }

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...