-
Re: Categories Dressing
I think this is the mod I'm looking for but have no idea how to get it to work for me.
If anyone could help greatly thankful, What I would like it to do is I have 3 catergories and I would like each caterory with it's own heading as a image and then the list of products under it. Like each catergory has it's own side box.
Is is the mod I need and how would I do It.
-
Re: Categories Dressing
Categories Dressing does not deal with the products, only the category/subcategory list. You would need something like the Expanded Category Tree mod which displays all categories, subs and products, and then apply some of the Categories Dressing code to that mod's tpl_ file.
-
Re: Categories Dressing
Thank you I'll give it a go
-
Re: Categories Dressing
Glenn, with your infinite wisdom would you show me how to hide a categorie from the Nav Categories Tab? I am assuming this is the correct file to edit: includes/templates/your_template/templates/tpl_modules_categories_tabs.php
hide $current_path == 16 from the navcattabs?
Thanks,
tin
-
Re: Categories Dressing
That file would be difficult to modify to single out one category for hiding. A better place would be /includes/modules/your_template/categories_tabs.php, where the output is built. Find this:
PHP Code:
$links_list = array();
while (!$categories_tab->EOF) {
// currently selected category
if ((int)$cPath == $categories_tab->fields['categories_id']) {
$new_style = 'category-top';
$categories_tab_current = '<span class="category-subs-selected">' . $categories_tab->fields['categories_name'] . '</span>';
} else {
$new_style = 'category-top';
$categories_tab_current = $categories_tab->fields['categories_name'];
}
// create link to top level category
$links_list[] = '<a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . (int)$categories_tab->fields['categories_id']) . '">' . $categories_tab_current . '</a> ';
$categories_tab->MoveNext();
}
and add a test to get this:
PHP Code:
$links_list = array();
while (!$categories_tab->EOF) {
if ((int)$cPath != 16) {//skip cat id 16
// currently selected category
if ((int)$cPath == $categories_tab->fields['categories_id']) {
$new_style = 'category-top';
$categories_tab_current = '<span class="category-subs-selected">' . $categories_tab->fields['categories_name'] . '</span>';
} else {
$new_style = 'category-top';
$categories_tab_current = $categories_tab->fields['categories_name'];
}
// create link to top level category
$links_list[] = '<a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . (int)$categories_tab->fields['categories_id']) . '">' . $categories_tab_current . '</a> ';
}//skip cat id 16
$categories_tab->MoveNext();
}
I haven't tested this and can't guarantee it will be free from oddities, but I think it will work ok.
-
Re: Categories Dressing
Glenn, I made the changes but no effect. I tried adding } here and there but just ending up not seeing anything on the page. Set it back to the mod above. cpath 16 still there.
Any other options you can think of?
Thanks,
tin
-
Re: Categories Dressing
I was testing the wrong variable. This will work:
PHP Code:
$links_list = array();
while (!$categories_tab->EOF) {
if ($categories_tab->fields['categories_id'] != 16) {//skip cat id 16
// currently selected category
if ((int)$cPath == $categories_tab->fields['categories_id']) {
$new_style = 'category-top';
$categories_tab_current = '<span class="category-subs-selected">' . $categories_tab->fields['categories_name'] . '</span>';
} else {
$new_style = 'category-top';
$categories_tab_current = $categories_tab->fields['categories_name'];
}
// create link to top level category
$links_list[] = '<a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . (int)$categories_tab->fields['categories_id']) . '">' . $categories_tab_current . '</a> ';
}//skip cat id 16
$categories_tab->MoveNext();
}
-
Re: Categories Dressing
Brilliant! Again!
Thank you Glenn!
Your humble follower,
tin
-
Re: Categories Dressing
I am fairly new and setting up a site;
www.pillownpillows.com
I have a questions in the sent up:
My expanded categories skips 2 lines for each product when I dress categories
reply:
Specifically, when using display: block; or display: list-item;, the <br /> after each category link needs to be deleted. Compare the tpl_categories.php file and the expanded tpl_ file to see the difference in that spot (marked by $disp_block in tpl_categories.php).
I could not locate expanded tpl_ file
there is only : tpl_category_list_box.php
which does contain display: block; or display: list-item;
Please advise
thank you
-
Re: Categories Dressing
tpl_category_list_box.php will be the tpl file for the expanded categories mod you are using. The file that Categories Dressing uploads when you install it is tpl_categories.php.
You will need to compare the two files and, where tpl_categories.php has $disp_block and tpl_category_list_box.php has <br />, delete the <br />. There will be several of these.
display: block; or display: list-item;
will not be in the php files; they are in the stylesheet (stylesheet_categories_dressing.css if you have uploaded it correctly).
You have put two declarations from stylesheet_categories_dressing.css into your main stylesheet and modified them to fit the stock class tags, which is fine. If the list-item markers are all you want, you only need to delete the <br /> tags as noted above. Test after each deletion to make sure you are not removing a necessary line break (you will not want to remove the <br /> tags after the specials/featured/new/all links.)
You also need to upload either the bullet1.gif and similar images that came with Cat Dressing, or your own marker images, unless you want to use the default disc markers.