If this is your first visit, check our documentation. To post, register or login.
Forums / Templates, Stylesheets, Page Layout / Need to edit a list style in a side box...

Need to edit a list style in a side box...

Started by webkat on 29 Jan 2012, 5:16 AM · Views: 1,034

Results 1 to 9 of 9
29 Jan 2012, 5:16 AM
#1
webkat avatar

webkat

Zen Follower

Join Date:
Jan 2012
Location:
New England
Posts:
238
Plugin Contributions:
0

Need to edit a list style in a side box...

Version v150, no upgrade, fresh install, the modules installed are Advanced Shipper, TinyMCE, and Blank Sidebox, all installed via FTP. I've customized a few CSS things (mainly the width of the shop and the side columns).
I've also disabled a lot of the blocks that were in the side columns.
Yes I've looked in the FAQ/Tutorials and searched the forum and haven't found an answer.
I even ran a Google search of site:http://www.zen-cart.com/ for what I was looking for.

What the source code says right now is this:

<div id="ezpagesContent" class="sideBoxContent">
<ul style="margin: 0; padding: 0; list-style-type: none;">
<li><a href="http://huckproducts.net/index.php?main_page=page&id=15&chapter=10&zenid=jftcro35gcdrbbq3df445khnp0">Improved Roller Wheels for the Total Gym®</a></li>
<li><a href="http://huckproducts.net/index.php?main_page=page&id=18&chapter=10&zenid=jftcro35gcdrbbq3df445khnp0">Total Gym® Wheels by Model</a></li>
<li><a href="http://huckproducts.net/index.php?main_page=page&id=16&chapter=10&zenid=jftcro35gcdrbbq3df445khnp0">Replacement Axles and Hitch Pins For The Total Gym®</a></li>
<li><a href="http://huckproducts.net/index.php?main_page=page&id=19&chapter=10&zenid=jftcro35gcdrbbq3df445khnp0">Replacement Cables For The Total Gym®</a></li>
<li><a href="http://huckproducts.net/index.php?main_page=page&id=20&chapter=10&zenid=jftcro35gcdrbbq3df445khnp0">Replacement Foot Harnesses with a leg pulley accessory</a></li>
<li><a href="http://huckproducts.net/index.php?main_page=site_map&zenid=jftcro35gcdrbbq3df445khnp0">Site Map</a></li>
<li><a href="http://huckproducts.net/index.php?main_page=page&id=17&chapter=10&zenid=jftcro35gcdrbbq3df445khnp0">Conversion Kits</a></li>
</ul>
</div>

You'll note that the ul style is hard-coded and can't be touched with the style sheet. Unfortunately those page titles are long enough that they wrap, and the block ends up looking like a paragraph, not a list. I want either more margin/padding between list items (ideal) or make it a bulleted list. Is there any way to change that? What file would it be? I just want to take out the hard coding and give it a class that I can edit in the stylesheet.

29 Jan 2012, 6:00 AM
#2
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,189
Plugin Contributions:
0

Re: Need to edit a list style in a side box...

Web,
Do you have a url to the page in question please ...
Without the http://www

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.

Zen Cart Certified hosting at myZenCartHost.com.

29 Jan 2012, 10:23 AM
#3
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Need to edit a list style in a side box...

you can change it to a bullet list by changing:

<ul style"margin: 0; padding; 0; list-style-type: none;">

to:

<ul style"margin: 0; padding; 0; list-style-type: square;"> <ul style"margin: 0; padding; 0; list-style-type: circle;">

or check this out:
http://www.w3schools.com/cssref/pr_list-style-type.asp

hope this helps!

29 Jan 2012, 5:42 PM
#4
webkat avatar

webkat

Zen Follower

Join Date:
Jan 2012
Location:
New England
Posts:
238
Plugin Contributions:
0

Re: Need to edit a list style in a side box...

haredo:

Web,
Do you have a url to the page in question please ...
Without the http://www

The site is huckproducts.net, if that's what you're asking (it's VERY VERY EARLY in its development; I'm just getting started and still learning Zen Cart. The site is FAR from being ready for the public--so please be gentle). The side box in question is "Important Links" on the right. Btw, how do I change the title of that box?

rbarbour:

you can change it to a bullet list by changing:

<ul style"margin: 0; padding; 0; list-style-type: none;">

to:

<ul style"margin: 0; padding; 0; list-style-type: square;"> <ul style"margin: 0; padding; 0; list-style-type: circle;">

or check this out:
http://www.w3schools.com/cssref/pr_list-style-type.asp

hope this helps!
Right, but where do I change that? The code is generated by Zen Cart and I don't know what file it's in...

29 Jan 2012, 6:15 PM
#5
stevesh avatar

stevesh

Black Belt

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

Re: Need to edit a list style in a side box...

You can do some separation by adding this to your stylesheet:

#ezpagesContent li {margin: 0 0 .5em 0;}

For the list style:

https://www.zen-cart.com/tutorials/index.php?article=38
https://www.zen-cart.com/tutorials/index.php?article=39

In this case, it's in:

includes/templates/template_default/sideboxes/tpl_ezpages.php

You'll want to save the file after editing to your override folder (edit: Which, unfortunately, you don't have, since you're using the Classic template. Search the Tutorials for custom and create your own template before you go any further.)

29 Jan 2012, 6:21 PM
#6
webkat avatar

webkat

Zen Follower

Join Date:
Jan 2012
Location:
New England
Posts:
238
Plugin Contributions:
0

Re: Need to edit a list style in a side box...

Can I just duplicate the classic theme, rename it, and switch to that and start editing that? Or is it more complicated than that? Also how does editing a file in the template_default folder rather than the classic folder work? Does it pull from both? I'm a little confused. Thanks for the links to the tutorials and for the CSS tip!

(I do search for tutorials but I never find the ones I need! I swear I try though!)

29 Jan 2012, 6:42 PM
#7
stevesh avatar

stevesh

Black Belt

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

Re: Need to edit a list style in a side box...

https://www.zen-cart.com/tutorials/index.php?article=142

Once you've created and selected your custom template, you can move the files you've edited in the classic folders to the corresponding custom folders. Once you've selected your custom template in admin, Zencart won't look in any classic folder for anything.

When Zencart needs to access a particular file, it looks first in the appropriate folder in the currently selected template. If it doesn't find the file it needs there, it goes to the proper template_default folder.

The Classic template, though installed by default, isn't the template_default - it's an example custom template.

30 Jan 2012, 3:37 AM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Need to edit a list style in a side box...

You'll note that the ul style is hard-coded and can't be touched with the style sheet. Just so you know, this isn't exactly true. Inline styling does take precedence over standard stylesheet styling, but if you add !important to a stylesheet rule's property declaration, it will override even inline styles. ```
#ezpagesContent ul {list-style-type: square !important;}

30 Jan 2012, 8:04 PM
#9
webkat avatar

webkat

Zen Follower

Join Date:
Jan 2012
Location:
New England
Posts:
238
Plugin Contributions:
0

Re: Need to edit a list style in a side box...

gjh42:

Just so you know, this isn't exactly true. Inline styling does take precedence over standard stylesheet styling, but if you add !important to a stylesheet rule's property declaration, it will override even inline styles. ```
#ezpagesContent ul {list-style-type: square !important;}


Oh that's good to know! I didn't know that before! Thanks!