Gossamer Forum
Home : Products : Gossamer Links : Discussions :

categories and links

Quote Reply
categories and links
Hi,
I feel this is a bit of a kop out but I can't get my head round this so wonder if anyone else can give me a cuddle.

I have got a main (home) page with lists of categories. When you click on a category it displays that category page and lists the links. From this page you can do a search and again categories or links.html is used to output the display.

links.htm and category.htm are underpinning the output.

But what I want to do is edit the link or category html page (can't get my head round which one) to display info related to that category when you first visit that category.

The problem is if I edit category.html or link.html it affects things globally so after a search my edited category/links pages are wrong, I only want to amend it on the category page.

Hope this makes sense, in a nutshell I want to be able to use ssi to dispay category related info on the category page, the user can then look at my nice page and then perform a search which will display the links in the category as normal.

Perhaps I am looking at this the wrong way and need to be one level up to instruct the links sql to go to my custom category page first, maybe this will avoid me having to knacker up my links.htm and category.htm.

any ideas anyone what I should actually be editing or changing here would be very appreciated.

kind rgds
Kev

Cheers
KevM
Quote Reply
Re: [KevM] categories and links In reply to
For the categories, have you considered using 'Category Template' for the category you want to have a different template? For example: test_Category.html to show up when you look at 'Test' or any of its sub-categories.

Then in it, so you don't use link.html, have something like;

Code:
<%loop links_loop%>
<%include test_link.html%>
<%endloop%>

Not sure if that makes it any clearer to you, or just confuses you more Sly (it confused me re-reading it, and I'm the one who typed it!)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] categories and links In reply to
Hi Andy,

good to hear from you again, the other matter never came back to me but you are at the front for anything else that comes along.

With the categories the actual layout is fine BUt I just don't want to display the links as soon as you get to the category, I want to save that for searches.

I can't get my head round which bit to edit as they are quite inter linked.

I also wonder if you know where I can find the html code to display the category name and have a link to it.

If you are on email I can send you a link if it helps to see it?

rgds

Kev

Cheers
KevM
Quote Reply
Re: [KevM] categories and links In reply to
Afraid i don't know.

Quote:
I also wonder if you know where I can find the html code to display the category name and have a link to it.

subcategory.html :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] categories and links In reply to
Hi,

subcat.html doesn't contain the code I need.

In a search, any search, the category is displayed in the results and it is a hyperlink back to the top, it seems to be a default in the program which I would like to add in the top somewhere...if I use

<font face="Verdana" size="1"><font color="#000080">You are here</font><br>
&nbsp;<font color="#C0C0C0">&gt; Main &gt;<a class="category_links" href="<%URL%>"></a>&gt; </font>
<font color="#000080">Search results page</font>

I get nothing at all bar my text around it.

Does anyone else know what builds the category pages, I need to change its layout without affecting the links.html, I think I need to call something else first time I pull up the category page.

rgds

Kevin

Cheers
KevM
Quote Reply
Re: [KevM] categories and links In reply to
   
In Reply To:

Hope this makes sense, in a nutshell I want to be able to use ssi to dispay category related info on the category page, the user can then look at my nice page and then perform a search which will display the links in the category as normal.[/quote]

Hi,

To do this, I would edit the category.html template. If you add a new field to your Category table - like full_description, you could remove all the link results from your category template completely and just show <%full_description%> instead. Then you could include your search bar above this to search the category. This means that the only way you would be able to view links would be by searching - you wouldn't be able to view them on the category pages at all - but this seems to be what you are asking for - unless I am misunderstanding?

Laura.
The UK High Street
Quote Reply
Re: [afinlr] categories and links In reply to
Thanks Laura,

this one had me stumped for a while but you set me off on the right track.

for anyone else who may be interested what I did was remove the <%link%> tag from category.html and then added another call to a premade html file called same_name_as_category.html...


<!-- remove links from category
<%links%>
-->

<%include <%category_name%>.html%>

wasn't sure if the double <% would work but it did. This now does not display links in the category but does on the serach results.

Thanks again Laura, this was really sending me round the twist

rgds

Kevin

Cheers
KevM