Forums / Templates, Stylesheets, Page Layout / Images on main page only

Images on main page only

Locked

Views: 3,544

Results 1 to 19 of 19
This thread is locked. New replies are disabled.
21 Feb 2010, 12:53 PM
#1
funkypapa avatar

funkypapa

New Zenner

Join Date:
Jul 2008
Posts:
84
Plugin Contributions:
0

Images on main page only

Hi, I've been looking through these forums for a couple of days now and I'm not finding a solution to (what looks like) a small problem I'm having.

I put some pictures on our main page (http://funkymunkys.ca) and have them lined up nice. However if you click on a category for products that has sub-categories...the pictures are on those pages as well. How can I make sure they don't leave the comfort of their home on the Home/Main page?

I knew pretty much nothing of web designing before starting this and have modded the Apple Zen template to suit what my wife is looking for. Any critiquing would also be greatly appreciated.

Thank you.

26 Feb 2010, 11:41 AM
#2
funkypapa avatar

funkypapa

New Zenner

Join Date:
Jul 2008
Posts:
84
Plugin Contributions:
0

Re: Images on main page only

Bump...

Is anyone able to help me with this problem?

Thank you.

26 Feb 2010, 12:27 PM
#3
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Images on main page only

What's your setting in Admin - Product Listing - Show SubCategories on Main Page while navigating ?

26 Feb 2010, 4:44 PM
#4
funkypapa avatar

funkypapa

New Zenner

Join Date:
Jul 2008
Posts:
84
Plugin Contributions:
0

Re: Images on main page only

In admin under Configuration>Product listing..the last line says Show SubCategories on Main Page while navigating.. I have tried this with it set to 1 for on and 0 for off, neither setting makes a change from the other.

<edit> I should clarify that somewhat. It makes no change to the pictures we have there. It does make a change as far as the subcategories, which display below those pictures.

8 Mar 2010, 12:31 PM
#5
funkypapa avatar

funkypapa

New Zenner

Join Date:
Jul 2008
Posts:
84
Plugin Contributions:
0

Re: Images on main page only

I posted this in another area a few weeks ago, however I'm haven't received many responses, so I'm re-posting it here hoping this may be the right spot.

Hi, I've been looking through these forums for what feels like a really long time now and I'm not finding a solution to (what looks like) a small problem I'm having.

I put some pictures on our main page (http://funkymunkys.ca) and have them lined up nice. However if you click on a category for products that has sub-categories..(like here)..the pictures are on those pages as well. How can I make sure they don't leave the comfort of their home on the Home/Main page?

I knew pretty much nothing of web designing before starting this and have modded the Apple Zen template to suit what my wife is looking for. Any critiquing would also be greatly appreciated.

Thank you.

8 Mar 2010, 3:21 PM
#6
funkypapa avatar

funkypapa

New Zenner

Join Date:
Jul 2008
Posts:
84
Plugin Contributions:
0

Re: Images on main page only

To elaborate more, I added the images through the tools>define pages editor. I changed my define_main_page.php to be

<p style="font-family: tahoma,arial,helvetica,sans-serif; color: rgb(102, 51, 0);"><font size="4">Our website is currently under construction. We apologize for any inconvenience. We hope to be fully operational soon.</font></p><p style="font-family: tahoma,arial,helvetica,sans-serif; color: rgb(102, 51, 0); text-align: center;"><font size="4"><br /></font></p><div style="text-align: center;"><br /> </div><div class="content" id="indexDefaultMainContent" style="text-align: center;"> <a href="index.php?main_page=index&cPath=10_11"><img style="width: 313px; height: 236px;" src="images/family/Questions_About_Cloth.JPG" /></a>

<a href="index.php?main_page=index&cPath=33"><img style="width: 313px; height: 236px;" src="images/family/Baby_Wearing2.JPG" /></a>

<img style="width: 313px; height: 236px;" src="images/family/Rewards.JPG" /><br />

<img style="width: 313px; height: 236px;" src="images/family/Specials.JPG" />

<a title="Monthly Specials" href="index.php?main_page=specials"><img style="width: 313px; height: 236px;" src="images/family/Monthly_Specials.JPG" /></a>

<a href="index.php?main_page=contact_us"><img style="width: 313px; height: 236px;" src="images/family/Contact_Us.JPG" /></a>

<a href="mailto:sangster.sabrina######################"><img style="width: 313px; height: 236px;" src="images/family/Green_Living.JPG" /></a>

<img style="width: 313px; height: 236px;" src="images/family/Gift_Registry.JPG" /> <img style="width: 313px; height: 236px;" src="images/family/Gift_Certificates.JPG" /> </div>

I hope this explains a little more.

8 Mar 2010, 3:25 PM
#7
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Images on main page only

It would appear as if you have assigned those images as CATEGORY IMAGES as well.

ie: When you created your categories, you would have had an option to upload an image for each category.

Is this what you did?

20 years a Zencart User

8 Mar 2010, 5:40 PM
#8
funkypapa avatar

funkypapa

New Zenner

Join Date:
Jul 2008
Posts:
84
Plugin Contributions:
0

Re: Images on main page only

No, I did not assign any images to the categories themselves. I placed the pics in the images folder myself a long time after I had made the categories.

If you choose a Category, or even a sub-category that has more categories underneath that one...the pics pop up on all the pages. However if you click on a category that does not have any type of sub-category in it...they are not there like here That's Diapering>Cloth Diaper Packages. If you go to Diapering>Cloth Diapers, then you'll see there are more sub-categories. I would think if they did get assigned to the categories/subs then wouldn't the pics display with each sub-category listing instead of pics all at the top and the listings all at the bottom?

My goal is to have them display only on the 'Home' page when you first enter the site.

If you need any other info simply let me know and I'll be happy to post back here with what I can.

Thank you.

10 Mar 2010, 8:51 PM
#9
funkypapa avatar

funkypapa

New Zenner

Join Date:
Jul 2008
Posts:
84
Plugin Contributions:
0

Re: Images on main page only

I found this thread... http://www.zen-cart.com/forum/showthread.php?t=42181&highlight=greeting+categories .. and I tried what was in post #4. When I then clicked on a main category that 'does' have subcategories, the line 'Hello Guest! Would you like to create an account or log yourself in?' Is now displayed ONLY on the home page. That is what I want, however the text \Welcome to Funky Munkys Family Clothing.' and 'Our website is currently under construction. We apologize for any inconvenience. We hope to be fully operational soon.' are still displayed on all the other category pages that have subcategories....I'm not an expert, but I don't know why it wouldn't display on ALL the category pages regardless if it has subcategories or not.

As to the post about possibly mixing the pics up with category images, below is the ALL of the code straight from my define pages editor in the admin section. This is where I inserted the pics from. I hope to get this resolved soon as our site is finally just about finished and ready to get stuff on.

<p style="font-family: tahoma,arial,helvetica,sans-serif; color: rgb(102, 51, 0);"><font size="4">Our website is currently under construction. We apologize for any inconvenience. We hope to be fully operational soon.</font></p><p style="font-family: tahoma,arial,helvetica,sans-serif; color: rgb(102, 51, 0); text-align: center;"><font size="4"><br /></font></p><div style="text-align: center;"><br /> </div><div class="content" id="indexDefaultMainContent" style="text-align: center;"> <a href="index.php?main_page=index&cPath=10_11"><img style="width: 313px; height: 236px;" src="images/family/Questions_About_Cloth.JPG" /></a>

<a href="index.php?main_page=index&cPath=33"><img style="width: 313px; height: 236px;" src="images/family/Baby_Wearing2.JPG" /></a>

<img style="width: 313px; height: 236px;" src="images/family/Rewards.JPG" /><br />

<img style="width: 313px; height: 236px;" src="images/family/Specials.JPG" />

<a title="Monthly Specials" href="index.php?main_page=specials"><img style="width: 313px; height: 236px;" src="images/family/Monthly_Specials.JPG" /></a>

<a href="index.php?main_page=contact_us"><img style="width: 313px; height: 236px;" src="images/family/Contact_Us.JPG" /></a>

<a href="mailto:OMITTED EMAIL ADDRESS"><img style="width: 313px; height: 236px;" src="images/family/Green_Living.JPG" /></a>

<img style="width: 313px; height: 236px;" src="images/family/Gift_Registry.JPG" /> <img style="width: 313px; height: 236px;" src="images/family/Gift_Certificates.JPG" /> </div>

Again, thank you for your responses.

11 Mar 2010, 11:08 AM
#10
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Images on main page only

I'm not sure why this might cause the problem, but ordinarily, you wouldn't place this in your define page code:

<div class="content" id="indexDefaultMainContent" style="text-align: center;">

Zencart will take care of that, so you have it in there twice on the main page, and on some other pages where it shouldn't be.

Just a suggestion for down the road, but inline styling is much more tedious and takes up a lot more space than wrapping stuff in divs and styling it all in the CSS.

11 Mar 2010, 12:29 PM
#11
funkypapa avatar

funkypapa

New Zenner

Join Date:
Jul 2008
Posts:
84
Plugin Contributions:
0

Re: Images on main page only

I used the developer tool kit and searched for the phrase "indexDefaultMainContent" and it's only found in 2 places..

includes/languages/english/html_includes/define_main_page.php

Line #1 : </div><div class="content" id="indexDefaultMainContent" style="text-align: center;">

and

/includes/templates/template_default/templates/tpl_index_default.php

Line #38 : <div id="indexDefaultMainContent" class="content"><?php require($define_page); ?></div>

Do you have any idea what would be making it show up where it shouldn't be?

11 Mar 2010, 12:40 PM
#12
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Images on main page only

includes/languages/english/html_includes/define_main_page.php

It shouldn't be in this file.

Editing it out is straight-forward:

admin >>> tools >>> define pages editor...

Open define_main_page.php and then TOGGLE to html mode (the <> icon in HTMLArea's menu bar).

Then (for starters) just re-name that ID to something different, such as:

<div class="content" id="myMainPageContent">

(Get rid of this bit style="text-align: center;)

You can now apply style declarations in the stylesheet for your new ID:-

#myMainPageContent {
 text-align: center;
 color: #4d4d4d;
 }

20 years a Zencart User

11 Mar 2010, 12:50 PM
#13
funkypapa avatar

funkypapa

New Zenner

Join Date:
Jul 2008
Posts:
84
Plugin Contributions:
0

Re: Images on main page only

schoolboy:

style="text-align: center;[/COLOR])

I have done this, thank you for pointing that out.

11 Mar 2010, 1:28 PM
#14
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Images on main page only

If so, your edit didn't 'take'.

I confirmed that the line in your define_main_page content:

<div class="content" id="indexDefaultMainContent" style="text-align: center;">

is the problem by opening your site in Firefox, navigating to the 'Diapering' subcategory then using Web Developer to add this to the stylesheet: #indexDefaultMainContent {display:none;}

The images disappeared.

If you remove that line, you'll be fine.

11 Mar 2010, 3:03 PM
#15
funkypapa avatar

funkypapa

New Zenner

Join Date:
Jul 2008
Posts:
84
Plugin Contributions:
0

Re: Images on main page only

I totally took the line out, now my define_main_page in the define pages editor reads...


<p style="font-family: tahoma,arial,helvetica,sans-serif; color: rgb(102, 51, 0);"><font size="4">Our website is currently under construction. We apologize for any inconvenience. We hope to be fully operational soon.</font></p><p style="font-family: tahoma,arial,helvetica,sans-serif; color: rgb(102, 51, 0); text-align: center;"><font size="4"><br /></font></p><div style="text-align: center;"><br />

<a href="index.php?main_page=index&cPath=10_11"><img style="width: 313px; height: 236px;" src="images/family/Questions_About_Cloth.JPG" /></a>

<a href="index.php?main_page=index&cPath=33"><img style="width: 313px; height: 236px;" src="images/family/Baby_Wearing2.JPG" /></a>

<img style="width: 313px; height: 236px;" src="images/family/Rewards.JPG" /><br />

<img style="width: 313px; height: 236px;" src="images/family/Specials.JPG" />

<a title="Monthly Specials" href="index.php?main_page=specials"><img style="width: 313px; height: 236px;" src="images/family/Monthly_Specials.JPG" /></a>

<a href="index.php?main_page=contact_us"><img style="width: 313px; height: 236px;" src="images/family/Contact_Us.JPG" /></a>

<a href="mailto:sangster.sabrina######################"><img style="width: 313px; height: 236px;" src="images/family/Green_Living.JPG" /></a>

<img style="width: 313px; height: 236px;" src="images/family/Gift_Registry.JPG" /> <img style="width: 313px; height: 236px;" src="images/family/Gift_Certificates.JPG" /> </div> ______________________________________________________

and if I add in the line

#indexDefaultMainContent {display:none;}

this hides the pics on the home page as well as the line that reads 'Our website is currently under construction. We apologize for any inconvenience. We hope to be fully operational soon.', but leaves then on the categories page along with the Welcome message. The line where you can click to login dissapears like it is supposed to on the categories page.

I don't know if it makes a difference, but in inserted it right below:
#indexHomeBody .centerColumn {
width: 98%!important;
float: center!important;
}

Sorry for being such a newb but I'm learning as I go.

Thank you again.

17 Mar 2010, 2:42 AM
#17
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Images on main page only

I use a very heavily customized derivative of the pure_orange template... but the code CODE is largely intact.

I don't have the problem you guys are experiencing.

What happens when you revert to the **classic **template ?

20 years a Zencart User

17 Mar 2010, 4:26 AM
#18
dealman876 avatar

dealman876

New Zenner

Join Date:
Jan 2010
Posts:
49
Plugin Contributions:
0

Re: Images on main page only

schoolboy:

I use a very heavily customized derivative of the pure_orange template... but the code CODE is largely intact.

I don't have the problem you guys are experiencing.

What happens when you revert to the **classic **template ?

I use pure_orange too, on two different sites, but the problem only occurs here http://www.dealport.net/index.php?main_page=index&cPath=1

but is perfect here:http://www.dealport.us/index.php?main_page=index&cPath=5

on the problematic site, i tried many other template but it is the same issue.

17 Mar 2010, 6:15 PM
#19
funkypapa avatar

funkypapa

New Zenner

Join Date:
Jul 2008
Posts:
84
Plugin Contributions:
0

Re: Images on main page only

Thank you thank you...

#indexCategoriesMainContent {display:none;} as mentioned in the other thread did the trick. I had tried adding #indexDefaultMainContent {display:none;} but that just got rid of all the pictures on every page. Now it is just how we wanted it. Again, thank you :clap: