Jump to content
Sign in to follow this  
nate_02631

[Contribution] Category Box as Nested Unordered List v1.0

Recommended Posts

Yes, there is, though it's a bit beyond the scope of the contribution (and this thread)... Check the included CSS for hints... #nav LI, is the first level #nav UL LI, the second, and so on... More info likely available on the Internets...

oh ok i thought it was simi simple :P

all the other stuff i kinda been figuring out as i go along.


Check out my fully customized oscommerce site by viewing my profile.

Share this post


Link to post
Share on other sites

Hello again....

 

I have installed this contrib to my site and set the CSS to make the first two levels of my list always visible and the final subcategories are set to fly-out. It looks great!! My problem is however, that the selected class makes my entire first set of subcategories(the always visible sub-set) highlight when a third and final set is selected.

 

like this:

 

Untitled-1.jpg

 

This happens even when a first category(like "Football") is selected. The entire sub-set gets the highlight. I see that it is because the <li class="selected"> doesn't get a </li> until the last sub-category. Do you know how I can have only the proper category highlighted for this CSS layout? It seems at this point I need to change the ul_categories.php to render a new class. I'm not sure what the right steps are yet, please help if you can.

 

Thank you

Edited by EidolonNight

James Tomasello

Share this post


Link to post
Share on other sites

I got it!!!! This seems to work.

 

/* Selected items with subcategories */	
#nav ul ul li.selected {
background-color: #FFCC00;
}
#nav li.selected a.daddy {
background-color: #FFCC00;
}


James Tomasello

Share this post


Link to post
Share on other sites

Please forgive my last post!

 

That is not correct either. What I need is for the top category to have a special class. let's say... #nav main or #nav top. How can this be properly applied?


James Tomasello

Share this post


Link to post
Share on other sites

I think I know how this can work but I can't seem to get the code to work right. If I can get the code to look at the parent id and give a class name of "top" or "main" or whatever to all categories with a parent id of 0, then I can get my CSS to manipulate the list properly. I have tried a few times to make it work but I'm afraid I don't understand exactly how to write this If statement. I am going to do a little more research, but feel free to post your thoughts on this.

 

Thank you


James Tomasello

Share this post


Link to post
Share on other sites

Here is a question, and maybe it doesn't belong in this thread but it directly relates to the problem I am having.

 

Can any one element(<div>,<li>,<td>,etc.) have more than one class? (<a class="top", "daddy" href=....)

 

That may not be the correct way to write it, but is this even possible?


James Tomasello

Share this post


Link to post
Share on other sites

Would have replied sooner - I don't know why - but I don't get email notifications on posts :(

 

Can any one element(<div>,<li>,<td>,etc.) have more than one class? (<a class="top", "daddy" href=....)

Yes, you can assign more than class to an element, just separate them with spaces. Looks something like...

<div class="firstclass secondclass"></div>

P.S. I have recently released another category menu replacement, thread readers might be interested in - "DynaMenu" for osCommerce. It makes use of the excellent PHP Layers Menu library to build horizontal drop-down, fly-out and tree menus (as well as plain menus)...

 

Check it out here:

http://www.oscommerce.com/community/contributions,4228


** Please do not PM with personal support requests (even if offering "payment"). Thank you.

Share this post


Link to post
Share on other sites
Newbie question, I am trying to change the bullets to a .gif file. How can I modify this?

In your stylesheet, usually something like:

UL, UL LI {
list-style-image: url('/path/to/my/image.gif');
}

More generic info about styling lists with CSS available in the web...


** Please do not PM with personal support requests (even if offering "payment"). Thank you.

Share this post


Link to post
Share on other sites

Hello,

 

it looks like this might be exactly what I'm looking for, could you tell me please how to apply same layout to all boxes including affiliate and information? Thanks a lot.


Absinthe Original Liquor Store

Share this post


Link to post
Share on other sites

I added this to a site and it worked fine. I'm working on a parallel site on the same server space in "root/redesign/catalog..." This is both a redesign and an update to the most recent version of OsCommerce. I have the sts and infobox contributions installed on both installations.

 

My problem is that on the parallel site, the classnames come out blank: <ul id="">. Could the problem be that the installation is in "root/redesign/catalog..." and not "root/catalog..." ?

 

Otherwise, what else could be wrong?

Share this post


Link to post
Share on other sites

hi can somone help

 

I have installed this contribution on both our sites the .co.uk site works fine but the .com site is using the bts template system and i am not sure how to get it to work please can some one take a look for me as the menu should be down the side but instead it goes accross I have used the correct file and is the same as our .co.uk site.

 

 

not working http://www.pcgiant.com/catalog/index.php

 

Working http://www.pcgiant.co.uk/catalog/index.php

 

 

Hope someone can help

 

Kind Regards

 

PC Giant

Share this post


Link to post
Share on other sites

Sorry another post should have asked in the earlier post is there any way to delay the folding of the menu like with dhtml you can use var DissapearDelay=700; // delay before menu folds in. how can we implement this into this contribution (Category Box as Nested Unordered List v1.0) as now it is very sensitive so if you move the mouse a little over the edge of the menu the menu folds instant we need to delay this for 1 sec but only the folding of the menu the expansion of the menu should be instant.

 

Hope some one can help

 

I would like to thank the author of this contribution Fantastic menu but I still cannot get it to work with BTS.

 

Thank you in advance

Share this post


Link to post
Share on other sites

Please can anyone help seems like i am on my own in this forum please hope some one can spare a few mins to help me with this it is realy starting to get to me I dont want to go another day banging my head against the wall please need help with below and above

 

Sorry another post should have asked in the earlier post is there any way to delay the folding of the menu like with dhtml you can use var DissapearDelay=700; // delay before menu folds in. how can we implement this into this contribution (Category Box as Nested Unordered List v1.0) as now it is very sensitive so if you move the mouse a little over the edge of the menu the menu folds instant we need to delay this for 1 sec but only the folding of the menu the expansion of the menu should be instant.

 

Hope some one can help

 

I would like to thank the author of this contribution Fantastic menu but I still cannot get it to work with BTS.

 

Thank you in advance

Edited by pcgiant

Share this post


Link to post
Share on other sites

Nice contrib :D

 

I have a question:

I want the contents in the dropdown to display in line, not as a list.

 

Dont want:

ROOT

SubCat1

SubCat2

SubCat3

 

I want:

ROOT

SubCat1 SubCat2 SubCat3

 

Is there a way to configure this?

Share this post


Link to post
Share on other sites

Hi!

 

Seems like a good contribution. I was just wondering, if there's a way to disable the very first parent level (i.e. 0) because I have done top level tabs in a different way.

 

BR

 

Jani

Share this post


Link to post
Share on other sites

Hello, Great contribution.

 

I have STS 4.1 installed on a site and I have your contribution also installed. I was wondering though how I can get that Javascript to work properly so the Flyout works in MSIE? I have it working for all other browsers but for some reason, the Javascript is not being executed properly or something where I have it.

 

When I view the source, the script is showing up in the header, it is just not executing.

 

Can anyone tell me what part of the puzzle that I might be missing here???

Share this post


Link to post
Share on other sites

hello all,

 

i have another question, how can i manage to disable empty categories with ul_categories.php?

 

in includes/boxes/categories.php it works fine with the contrib adding this

 

if(!tep_count_products_in_category($categories['categories_id']) == 0){

 

to the wile...

 

but not on ul_categories.php :(

 

any idea?

 

i've tried with 'Enable & Disable Categories' contrib but did not work, and for a lot of categories it would be easier to automatically hide the one's empty...

 

claudia

Share this post


Link to post
Share on other sites

What a great contribution. I was about to remake a website for a customer, and I though about using the suckerfish css-menu fra alistapart.com. Luckily you made this, so I didn't have to cry to much about mysql selects :P

 

On another note. The first thing my customer complained about, is that inactive categories also showed in the menu. This little change did it:

 

$result = tep_db_query('select c.categories_id, cd.categories_name, c.parent_id from ' . TABLE_CATEGORIES . ' c, ' . TABLE_CATEGORIES_DESCRIPTION . ' cd where c.categories_status = "1" and c.categories_id = cd.categories_id and cd.language_id="' . (int)$languages_id .'" '.$parent_query.' order by sort_order, cd.categories_name');

 

where I added

c.categories_status = "1"

 

I found it in coolmenu.php (the former solution on the site).

Edited by broeman

Share this post


Link to post
Share on other sites

On my site the last <li> dosn't get closed for some reason. Can anyone shed any light on this? I'm trying to get my site to validate as XHTML strict and this is the last error I have for my home page.

 

Share this post


Link to post
Share on other sites

great contrib , but just a quickie on this...

 

I want to have JUST the selected top level category and children categories showing, ie no other TLC's. Is this possible?

Share this post


Link to post
Share on other sites
On my site the last <li> dosn't get closed for some reason. Can anyone shed any light on this? I'm trying to get my site to validate as XHTML strict and this is the last error I have for my home page.

 

For me this has done the trick - just in case anyone else has similar prob.

 

	// Close off nested lists
for ($nest = 0; $nest <= $GLOBALS['this_level']; $nest++) {
  if ($nest == '1') { $output .= '</li>'; } // my change
	$output .= '	</ul>';
	}		 
return $output;

Share this post


Link to post
Share on other sites

How can I modify this to show the manufacturers instead of the subcategories?

 

For instance:

 

CAT 1 --> Sub 1 --> Sub 2

CAT 2 --> Sub 1 --> Sub 2

CAT 3 --> Sub 1 --> Sub 2

 

Change to:

 

CAT 1 --> Manufacturer 1 --> Man 2

CAT 2 --> Manufacturer 1 --> Man 2

CAT 3 --> Manufacturer 1 --> Man 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×