-
Re: Categories Dressing
Juliet -
All you need to do for an image based menu is to name the images like catimg23.gif or catimg5_17.gif (using the cPath of the category for the numbers) and save them in /includes/templates/your_template/images/.
Make the images the exact pixel size you want them to display at.
You can find the cPath for each category by bringing it up onscreen and looking at the address bar at the top of the window. The URL will include ...&cPath=5_17&... for category 5_17. (If you have an SEO mod installed it will be different.)
-
Re: Categories Dressing
Relentless -
Changing the stylesheet will not make your headings into links; you need to add the HTML link code to the heading text in tpl_categories.php.
PHP Code:
case '28': //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')
//I would like these Headings,to be links.
. '</span>':'
>Air Conditioning<br />
Split System<br />
Ducted<br /></span>'
. $disp_block_head) . "\n";
break;
You are not using images or dividers here, so you can simplify the code by eliminating those.
You can change the <span> to an <a href=...> using the zen_href_link() function which will automatically give you the link to the category immediately below the heading.
PHP Code:
case '28': //replace number with your desired cPath
$content .= '<a class="catBoxHeading1" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">>Air Conditioning<br />
Split System<br />
Ducted<br /></a>'
. $disp_block_head) . "\n";
break;
You can add styling if you want in the stylesheet:
a.catBoxHeading1:visited {add style);
a.catBoxHeading1:hover {add style);
a.catBoxHeading1:active {add style);
-
Re: Categories Dressing
See your previous entry
$content .= '<a class="catBoxHeading1" href="'
Is this correct see dbl. quotes at end of line
$content .= '<a class="catBoxHeading1" href=""
Thank you
Relentless
-
Re: Categories Dressing
<?php
// is this is the change to enable Heading link
case '28': //replace number with your desired cPath
$content .= '<a href="catBoxHeading1"' . zen_href_link(FILENAME_DEFAULT,
$box_categories_array[$i]['path']) . '">
>Air Conditioning<br />
Split System<br />
Ducted<br /></a>'
. $disp_block_head) . "\n";
break;
?>
Thank you Relentless
Entry 303 ignore
-
Re: Categories Dressing
The above will not work. You can't combine the class tag and the href like that.
The double and single quotes you show in the previous post are correct, but I will check the rest over for typos.
-
Re: Categories Dressing
MoltoDelta, Gjh42
thanks for the input - i've fixed the semi colon and the size (the size was my bad 8s and 0s look alike to bad eyes, but now even with the corrected height when you mouse over where gc should be the hover image pushes the menu down) and arranged the sort order for gc to be on top.
i'll continue to fuss with it, and if i figure it out i'll let yall know. thanks!
-
Re: Categories Dressing
It is always better if you research an issue yourself, thank you.
I think this is correct.
<?php
{
case '28': //replace number with your desired cPath
$content .= '<a href="http://www.samplewebsite.com/index.php?main_page=index&cPath=28&zenid=xxx...">' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">>Air Conditioning<br /> Split System<br /> Ducted<br /></a>' . $disp_block_head) . "\n";
break;
)
?>
Relentless
-
Re: Categories Dressing
Here's a way to use categories dressing on multilanguage site? When I switch language the mod don't work. I think is only a configuration issue... the site is www.kipria.it/store.
Tanks.
Silvio.
-
Re: Categories Dressing
Sorry, I didn't build it to work with multiple languages. I have another mod, Image Titles, which does work for multiple languages, and it would be relatively easy to change Categories Dressing to work the same for images, but the heading and subtext text is coded into the template file and would require changing the way the mod is constructed, to draw text from a language file instead of direct code.
This is a worthy thing to do, but I don't see having time in the near future to do it. I have thought about this in the past, and will continue to poke at it. I will eventually make it happen.
-
Re: Categories Dressing
A way to do this without inventing new coding has occurred to me. It is a workaround, not an elegant solution, but it will do the job for now.
What you are having problems with is the subtext. Find this section in tpl_categories.php (yours will be larger because you already have several cases customized)
PHP Code:
// 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
and wrap a language test around it with a duplicate section for each language.
if ($_SESSION['language'] == 'english') {
... set of cases for english
}else{ //language is italian
... set of cases for italian
} //if language
PHP Code:
// categories dressing - add subtext below a cat
if ($_SESSION['language'] == 'english') {
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;
} //english subtext
}else{ //language is italian
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;
} //italian subtext
} //if language