Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Changing Layout of Category Images on Main Page.

Changing Layout of Category Images on Main Page.

Locked

Views: 2,839

Results 1 to 15 of 15
This thread is locked. New replies are disabled.
29 Jan 2007, 2:38 PM
#1
michaeld avatar

michaeld

New Zenner

Join Date:
May 2006
Location:
UK
Posts:
28
Plugin Contributions:
0

Changing Layout of Category Images on Main Page.

Hi all, I'm using Zen Cart 1.3.7.

Site URL: http://www.dotcomtoolsuk.com

I want to display the top level category images on my main page differently to the subcategory images on the category pages, can this be done?

On the category pages, I have images that are 150px square with 3 images per row. See example **here**.

However, on the Main Page, I want to show my top level categories with images that are 100px square and have 5 images per row.

Using Firebug, I found the code that controls this:

<div class="categoryListBoxContents" style="width: 33%;">
</div>
<div class="categoryListBoxContents" style="width: 33%;">
</div>
<div class="categoryListBoxContents" style="width: 33%;">
</div>
<br class="clearBoth"/>
<div class="categoryListBoxContents" style="width: 33%;">
</div>
<div class="categoryListBoxContents" style="width: 33%;">
</div>
<div class="categoryListBoxContents" style="width: 33%;">
</div>
<br class="clearBoth"/>
<div class="categoryListBoxContents" style="width: 33%;">
</div>
<div class="categoryListBoxContents" style="width: 33%;">
</div>
<div class="categoryListBoxContents" style="width: 33%;">
</div>
<br class="clearBoth"/>
<div class="categoryListBoxContents" style="width: 33%;">
</div>
<br class="clearBoth"/>

I assume that this is a result of the settings made in the Admin>Configuration>Maximum Values page as any changes made there affect the display of all category images.

So, is there a way to change the layout of the Main Page category images without affecting the layout of the subcategory images on the category pages? If so, which file/s would I need to edit?

I've searched the forums but found nothing on this subject so any help will be much appreciated.

Regards,

Michael.

My first Zen Cart site: www.dotcomtoolsuk.com

31 Jan 2007, 11:54 AM
#2
michaeld avatar

michaeld

New Zenner

Join Date:
May 2006
Location:
UK
Posts:
28
Plugin Contributions:
0

Re: Changing Layout of Category Images on Main Page.

Should I take it that no one has any ideas about this?

My first Zen Cart site: www.dotcomtoolsuk.com

31 Jan 2007, 12:03 PM
#3
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Changing Layout of Category Images on Main Page.

It appears that you have this squared from looking at the pages that you posted

If I am not miunderstanding your issue incorrectly - this can be done from admin > images > and setting the image dimensions there.

Zen-Venom Get Bitten

31 Jan 2007, 12:14 PM
#4
michaeld avatar

michaeld

New Zenner

Join Date:
May 2006
Location:
UK
Posts:
28
Plugin Contributions:
0

Re: Changing Layout of Category Images on Main Page.

Yes, I've successfully put smaller category images (100 x 100px) on the Main Page whereas my subcategory images are 150 x 150px.

However, I still can't find a way to have 2 rows of 5 category images on the Main Page whilst retaining the 3 images per row layout of the subcategory pages.

If there is no way of achieving this then I would just like to know so that I can move on.

Thanks for your response.

My first Zen Cart site: www.dotcomtoolsuk.com

31 Jan 2007, 12:33 PM
#5
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Changing Layout of Category Images on Main Page.

However, I still can't find a way to have 2 rows of 5 category images on the Main Page whilst
This depends on how you have your install set to display the main page items - if this is main opens with categories this is more diddicult than if this is the listing of whats new or featured. How is your set?

Zen-Venom Get Bitten

31 Jan 2007, 1:39 PM
#6
michaeld avatar

michaeld

New Zenner

Join Date:
May 2006
Location:
UK
Posts:
28
Plugin Contributions:
0

Re: Changing Layout of Category Images on Main Page.

Yes, in the admin I have switched on: Categories - Always Show on Main Page.

My first Zen Cart site: www.dotcomtoolsuk.com

2 Feb 2007, 12:03 PM
#7
michaeld avatar

michaeld

New Zenner

Join Date:
May 2006
Location:
UK
Posts:
28
Plugin Contributions:
0

Re: Changing Layout of Category Images on Main Page.

Hello... Is there anyone out there? Please can someone help with this?

My first Zen Cart site: www.dotcomtoolsuk.com

2 Feb 2007, 12:44 PM
#8
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Changing Layout of Category Images on Main Page.

As I eluded to in my earlier post that if this was the main opens with categories that this would be more difficult. And as this is the case it would require recoding at least the tpl_main_page.php to ignore the admin/DB entry for this in favor of a hard coded presentaion.

This is a bit more involved than can be addressed in a few posts in this forum venue. If you determine that this is highly important to your site you might try posting in the commercial help wanted forum here.

Zen-Venom Get Bitten

2 Feb 2007, 1:18 PM
#9
michaeld avatar

michaeld

New Zenner

Join Date:
May 2006
Location:
UK
Posts:
28
Plugin Contributions:
0

Re: Changing Layout of Category Images on Main Page.

Thanks very much for clearing that up for me. I guess I'll have to forget about it for now then.

Would it be worth submitting this question to the FAQ ask a question section or is this beyond the scope of what that section is intended for?

My first Zen Cart site: www.dotcomtoolsuk.com

2 Feb 2007, 2:08 PM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Changing Layout of Category Images on Main Page.

Were you looking to change how many across there are?

There is a setting in the Maximum Values for how many Category images to display per row ...

Categories To List Per Row
How many categories to list per row

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

2 Feb 2007, 3:19 PM
#11
michaeld avatar

michaeld

New Zenner

Join Date:
May 2006
Location:
UK
Posts:
28
Plugin Contributions:
0

Re: Changing Layout of Category Images on Main Page.

Thank you for your input Linda however, I am aware of the setting available in the Maximum Values section of the Admin.

The problem is that I want to display my Top Level Category images on the Main Page (5 images (100 pixels square) per row) differently to my Subcategory images on the Subcategory Pages (3 images (150 pixels square) per row).

It appears that there is no easy way of doing this and has also been suggested that this forum is not the most appropriate place to find a solution.

I would still like to know whether a question in the FAQ section would be appropriate or is the only option open to me to have to pay for some hired help as recommended above?

My first Zen Cart site: www.dotcomtoolsuk.com

3 Feb 2007, 4:51 PM
#12
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Changing Layout of Category Images on Main Page.

Aha! a clue ...

Nope ... by default this is one way regardless ...

You would need to customize the code to manage it differently ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

4 Feb 2007, 9:45 AM
#13
michaeld avatar

michaeld

New Zenner

Join Date:
May 2006
Location:
UK
Posts:
28
Plugin Contributions:
0

Re: Changing Layout of Category Images on Main Page.

Yeah, that's what kobra said.

I would still like to know whether a question in the FAQ section would be appropriate or is the only option open to me to have to pay for some hired help as recommended above?

My first Zen Cart site: www.dotcomtoolsuk.com

4 Feb 2007, 12:27 PM
#14
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Changing Layout of Category Images on Main Page.

The following is JMO:

I would still like to know whether a question in the FAQ section would be appropriate or is the only option open to me to have to pay for some hired help as recommended above?
As the desire to have 5 on one page and 3 on the rest for this is an individual need for your own very good reasons, and what I envision as the complexity to enable this feature( and I have been known to be incorrect about these things), Posting anywhere to have a single/minimal use modification generated by the community is a blind alley that you can try. The most expedient solution to this is to evaluate if your requirement is important enough for your use and if it is to post this in the commercial help forum. You might post there to obtain an idea of the estimated time/cost for this to assist you in making this decision. But please be upfront about your wanting an estimate to aid in your decision making

Zen-Venom Get Bitten

4 Feb 2007, 1:52 PM
#15
michaeld avatar

michaeld

New Zenner

Join Date:
May 2006
Location:
UK
Posts:
28
Plugin Contributions:
0

Re: Changing Layout of Category Images on Main Page.

Thank you kobra, I think that answers my question.

As it is not critical that I find a way to implement this immediately, I will move on now. Maybe I could add this to the feature wish list if it has not already been suggested.

Given that the function and purpose of the Main Page is different to the function and purpose of the Subcategory pages, it does seem to me that it would be useful to have separate layout options for the Top Level Category images shown on the Main Page rather than them having to be displayed the same as the subcategory images on the subcategory pages.

Anyway, thanks again for all your advice kobra and Linda.

My first Zen Cart site: www.dotcomtoolsuk.com