Placing something in the category list.

Proxivire

No avatar

2007-01-12 23:02

Good day,

Is it possible to place something within the category list, to say, group certain categories together?
Like say, a bar with some text in it (html), which would come inbetween two groups of categories.

Basically, is there any way to place anything between categories, instead of just at the very top or bottom?

-DmD-

trzykas

Avatar: trzykas

2007-01-13 13:53

you got something like position in categories 0 is the top and >0 is the next if you got 5 category and you want to place something betwen 3-4 you make newcategory and in the position you write 4 :> in the description write what you wand in html code and that's all
good luck :>

trzykas

Proxivire

No avatar

2007-01-15 01:14

trzykas:

That would work, but then you'd still have a clickable category, I meant more like a solid, unclickable bar, with a single word or line of text in it, or am I missing something about the html possibilities in the description? (never did figure out why there's Two boxes of input for categories, maybe I'll find it in the documentation somewhere ;D )

-DmD-

idaryl

Avatar: idaryl

2007-01-15 01:43

Open the page.tpl and look for (about line 43) this <li><a href="?p=productsList">$lang[products]</a></li> there should also be $sContentsMenu and <a href="?p=ordersBasket">$lang[basket]</a></li> there

Simply place your string there eg: <li>Text Here</li> There will be an issue with the menu style (its not a href link so the style will be different - you will have to look at the [#menu dt a,] about line 90 of either your default.css or if you are using the right css, there....

Hope this helps - let me know

Proxivire

No avatar

2007-01-15 02:31

idaryl:

Thanks for the ideas again, but I'm afraid I haven't explained myself well enough, the link below shows a very crappy example what I'm trying to get, basically a bar at a specific location inside the categories listing, unclickable. Currently I'm trying to make the programming read the category's on or off setting differently, with a third option, so I can make it read what it should do at a different location than the <dt> line in categories.php, but I haven't found where to implement that just yet.

Also, do you know of a way to change the colour of the category you're currently in? Like, you click it and it has a different colour, or is underlined, basically something indication you're in there?

-DmD-

idaryl

Avatar: idaryl

2007-01-15 03:49

Go to your admin area and choose the category listing you want eg: Plastic Modelbouw - tanks (looks like you already did it) and add a <br> then you add your text...

Unfortunately the dialog field will only accept 70 characters (I counted them) so you are limited _ I tried to get an image in there but was foiled by the character limitation - DONT place a table in there it will screw up the admin and the cart.

Ask Treewood? about the character limitation, if he can point you the right way it will help me too.

Let me know

Proxivire

No avatar

2007-01-15 04:32

idaryl:

That would mean it'd still be clickable, and part of the category itself, not exactly what I'm looking for.
I'll figure it out, at some point, maybe :P

Thanks again :)

-DmD-

Proxivire

No avatar

2007-01-15 07:48

idaryl:

Figured it out (not the character limit though), was a bit tricky, but okay, need to polish it a bit still, so I'll post about it tomorrow, it's 7:48am here, I'm going to bed >P

Crude example below.

-DmD-

idaryl

Avatar: idaryl

2007-01-15 08:04

please get back to me on this - This could be useful

Let me know

Proxivire

No avatar

2007-01-15 20:10

Alright, after spending about 9 hours looking around all the files, turns out this is all you have to do:

Create a category that you're going to use for your bar, or picture or whatever.
refresh your shop, look at your source. You'll see this:
<div id="menu">
<dl>
followed by a bunch of <dt> and </dt> lines.
Find the one that belongs to the category you made for this and copy the line from <dt> to </dt> (put it at 'categorylink' pointed out below).

Go to your index.php and insert this*:

$sCategoriesMenu = str_replace('categorylink','replacementcode',$sCategoriesMenu);

use the ' to open and close the data, not " or it'll mess with the script. (it'll think the " from the url is the closing statement).

What this does is it searches for the category code and replaces it with whatever you want in it's place. And that's that.
if you make the replacement code a link, it'll get the whatever arrow icon you have set next to it, just like the categories. I'm still trying to mess around with the .css to give the categories below the line a different icon, haven't gotten it yet, but I will at some point ;D

Using a category you can use the position setting to put it wherever you want in your list.

Good luck :)

*insert it just above these lines, nearly all the way at the bottom:
echo $tpl->tbHtml( 'page.tpl', 'HEAD'.$sBlockPage ).$content.$tpl->tbHtml( 'page.tpl', 'FOOTER'.$sBlockPage );
?>

-DmD-

idaryl

Avatar: idaryl

2007-01-16 00:32

Hmmn [ refresh your shop, look at your source ] source of...?

I'm going to definately try this, this once I get past the first part.

Too bad theres no "rating" system for help here - you'd get a "star' from me

Let me know

Proxivire

No avatar

2007-01-16 10:49

By source I meant your page's source code.

In most browsers you should have the option to right click on a page and select "View Page Source", or something to that effect :)

-DmD-

Proxivire

No avatar

2007-01-17 22:49

Looks like I made a mistake.

When doing this it'll mess up something with pictures, if you click on one you'll get the picture with an error referring to $sCategoriesMenu.

A fix seems to be to include it in a simple if statement. Like so:

if ( isset( $sCategoriesMenu ) ){
$sCategoriesMenu = str_replace('categorylink','replacementcode',$sCategoriesMenu);
}

-DmD-

Back to top
about us | contact