Jump to content

How do I remove Category image from Subcat?


Guest tenguyugen

Recommended Posts

Guest tenguyugen

I know I know, I searched for a tip on this but cannot seem to find it. I have a simple category, inside that category are 5 others. Each subcategory has it's own image. Works great. Except the main Category image is bring displayed at the bottom of the Subcategories. Am I missing something simple, or is this a simple file edit?

Here's a link to an offending page:

http://www.tabiforless.com/index.php?act=v...at&catId=11

See how that image at the bottom is there (without the text under it, slightly off-centered)? It's not supposed to be there! It's the Category image, one tier up. But for some reason it's being rendered there.

Any hints?

Link to comment
Share on other sites

Well, it shouldn't be inside that box, the stock CubeCart code puts it beneath that box. It is the "Current Category Image"

That image is meant to display on the current category page. As I mentioned, in stock CubbeCart, if you have subcats, CC will display them first, then the current cat image below them. Many people elect to move the current cat image to the top, and have subcats display below the current cat image, which seems to make more sense.

The fact that your current cat image is moving up into the subcat section rather than displaying beneath it may indicate that you have made an error in customizing your subacat code somewhere.

To remove, or move, the current image, you must normally deal with this block of code in styleTemplates/content/viewCat.tpl:

<!-- BEGIN: cat_img -->

<img src="{IMG_CURENT_CATEGORY}" alt="{TXT_CURENT_CATEGORY}" border="0" title="{TXT_CURENT_CATEGORY}" />

<!-- END: cat_img -->

If you want to retain this on the final cat page in a tree, and have it invisible for pages that show subcats, you have to mod the code in includes/content/viewCat.inc.php so that it doesn't parse <!-- BEGIN: cat_img --> when subcats are present.

HTH

Link to comment
Share on other sites

Guest tenguyugen

I think I kind of understand what you are saying here. However the only thing I've edited has been the CSS for the categories:

#subCats {

background-color: #FFFFFF;

text-align: center;

border: 1px solid #FFFFFF;

margin: 0px;

padding: 1px;

float: left;

width: 520px;

}

.subCat {

text-align: center;

padding: 10px;

float: left;

width: 110px;

height: 100px;

There's nothing there that seems to have caused this that I can find.

If you want to retain this on the final cat page in a tree, and have it invisible for pages that show subcats, you have to mod the code in includes/content/viewCat.inc.php so that it doesn't parse <!-- BEGIN: cat_img --> when subcats are present.

What does this entail? Is this a more detailed code edit, or is there a reference for this?

Thanks for the tips, I really appreciate it.

Link to comment
Share on other sites

Guest tenguyugen

Well I removed the code example you provided from viewcat.tpl and it jsut removed the Category image from the Subcat page. That was it? It's the result I wanted, but is there supposed to be more to it? (i.e. Can it be THAT easy? LAWL!)

Thank you! :)

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...