Please accept my huge thank you! :clap: You saved me hours of searching! I am learning, slowly!! :unsure:
I have a few tweaks to do and I think I am set to have products added!
Off to search for instructions on those! :)
Printable View
Please accept my huge thank you! :clap: You saved me hours of searching! I am learning, slowly!! :unsure:
I have a few tweaks to do and I think I am set to have products added!
Off to search for instructions on those! :)
This may have been asked and answered, if so, I do apologize, but I've gone thru the whole thread and can't find the answer to my problem.
I'm having trouble positioning my Non-Linked Headings.
I want a Non-Linked Heading to be the first thing in my category menu. My first top category is cpath 4. When I put cpath 4 in the code, the heading is showing up BELOW my top category instead of above it.
You can see what it's doing here: www.nybwholesale.com
The Xelement Men's Boots should be under the Heading Motorcycle Boots.
What am I doing wrong? :frusty:
Thanks!
Very strange. I don't see a cause for this. I do notice that Men's Boots is not the first category; category 15, which has no name, comes first. It shows as a sliver of space above Men's Boots.
Can you paste the section of tpl_categories.php for say 10 lines above and below your header code? Use [php] and [/php] tags to make it easier to read.
Thanks for checking it Glenn!
No Men's Boots is not the first category. It was originally a subcategory I moved up. Would that make a difference? The #1 category was the original top category Motorcycle Biker Boots. It's still there, just turned off.
The Boots are categories 4 (Men's) & 5 (Ladies).
I just installed this mod on another site and it did the same thing, but luckily on it, there was a category above it so it still worked.
Here is my code lines 80 - 129:
The #15 and 16 categories you saw with no names, I had just added and my ISP timed out before they were saved. LOL Sorry about that.PHP Code:
if (SHOW_COUNTS == 'true') {
if ((CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) {
$content .= CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX;
}
}
$content .= $disp_block . "\n";
// categories dressing - add subtext below a cat
switch ($current_path) {
case '23': //replace number with your desired cPath
$content .= '<span class="catBoxSubtext">Subtext for cat 23 escape apostrophe\'s</span>' . $disp_block . "\n";
break;
} // subtext
}
// categories dressing - add (divider and) heading above a cat
$disp_block_head = '';
//$disp_block_head = '<br />'; // for heading not block uncomment this line
switch (str_replace("cPath=","",$box_categories_array[$i]['path'])) {
case '4': //replace number with your desired cPath
//$content .= '<hr class="catBoxDivider" />' . "\n"; // to add divider uncomment this line
$content .= '<span class="catBoxHeading1">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') . '</span>':'Motorcycle Boots</span>' . $disp_block_head) . "\n";
break;
}
// categories dressing - add (divider and) heading above a cat
$disp_block_head = '';
//$disp_block_head = '<br />'; // for heading not block uncomment this line
switch (str_replace("cPath=","",$box_categories_array[$i]['path'])) {
case '5': //replace number with your desired cPath
//$content .= '<hr class="catBoxDivider" />' . "\n"; // to add divider uncomment this line
$content .= '<span class="catBoxHeading1">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') . '</span>':'Motorcycle Gear</span>' . $disp_block_head) . "\n";
break;
}
}
if (SHOW_CATEGORIES_BOX_SPECIALS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true' or SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
// display a separator between categories and links
if (SHOW_CATEGORIES_SEPARATOR_LINK == '1') {
$content .= '<hr id="catBoxDivider" />' . "\n";
}
if (SHOW_CATEGORIES_BOX_SPECIALS == 'true') {
//$content .= '<span class="catBoxHeading1">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead-specials.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead-specials.gif') . '</span>':'Link Heading</span>' . $disp_block_head) . "\n";// categories dressing - uncomment this line for heading above link
$show_this = $db->Execute("select s.products_id from " . TABLE_SPECIALS . " s where s.status= 1 limit 1");
if ($show_this->RecordCount() > 0) {
$content .= '<a class="category-links" href="' . zen_href_link(FILENAME_SPECIALS) . '">' . CATEGORIES_BOX_HEADING_SPECIALS . '</a>' . $disp_block . "\n";
}
}
You have duplicated the whole switch block; what you should have duplicated is just the case block:I'm not sure offhand how that would cause a problem, but it's definitely not the right way to do it. Try substituting the code above for yours and see what happens.PHP Code:
// categories dressing - add (divider and) heading above a cat
$disp_block_head = '';
//$disp_block_head = '<br />'; // for heading not block uncomment this line
switch (str_replace("cPath=","",$box_categories_array[$i]['path'])) {
case '4': //replace number with your desired cPath
//$content .= '<hr class="catBoxDivider" />' . "\n"; // to add divider uncomment this line
$content .= '<span class="catBoxHeading1">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') . '</span>':'Motorcycle Boots</span>' . $disp_block_head) . "\n";
break;
case '5': //replace number with your desired cPath
//$content .= '<hr class="catBoxDivider" />' . "\n"; // to add divider uncomment this line
$content .= '<span class="catBoxHeading1">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') . '</span>':'Motorcycle Gear</span>' . $disp_block_head) . "\n";
break;
}
The positioning problem is caused by the location where you put your duplicates. They come after the category name in the code, so they will display after it.
You need to put that code block back up where it originally was.
Hey,
Where do I comment out the "Link Heading"? I want it to go away.
Thanks,
JP
Around line 130 in tpl_categories.php:PHP Code:
if (SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
/*here*/ $content .= '<span class="catBoxHeading1">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead-all.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead-all.gif') . '</span>':'Link Heading</span>' . $disp_block_head) . "\n";// categories dressing - uncomment this line for heading above link
$content .= '<a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_ALL) . '">' . CATEGORIES_BOX_HEADING_PRODUCTS_ALL . '</a>' . "\n";
}
Thanks!
JP
Can Category Dressing create flyout menus.
Similar to left menu at http://fotonapakymppi.fi/tuotteet.php .
marksu
No, flyout menus are a completely different kind of code. They would probably modify the same tpl_categories.php file, though, so it would be difficult to use them together.
There are a few flyout-type mods in Downloads. Look them over and see which one suits you best.