Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Please Help!

Quote Reply
Please Help!
I'm totally lost when it comes to cgi.

Please take a look at page: http://kittymother.com/2bawinner/Sweepstakes_-_Daily/. Note the subcategory listing on the left hand side under "Sort By Prize." I want this to appear on all pages for each category, but don't know what to do to make this happen. If you look at the next page, you will see what I mean. Any advice will be greatly appreciated. Thanks. KittyMother

Quote Reply
Re: Please Help! In reply to
I am confused...do you want main categories of your site to appear in all category pages or simply put the sub-categories of the categories in the category pages?

If it is the latter, then all you have to do is put the following tags:

Code:

<%if category%>
<%category%>
<%endif%>


In the row where you want them to appear.

Then edit the subcategory.html file that lists links to sub-categories in a vertical manner using line break or paragraph break HTML codes.

If it is the former you want, then you would have to tweak the codes a bit.

Regards,

Eliot Lee

Quote Reply
Re: Please Help! In reply to
I want to have sub-categories of the categories listed on the category pages. The links listed to the left under "Sort By Prize" is sub-categories generated by the coding you suggested. However, it only appears on the first page of the category and I would like it on all pages of the category.

Example when you go to the next page, http://kittymother.com/2bawinner/Sweepstakes_-_Daily/more2.html, it is not generating there and I'm would like them to.


Quote Reply
Re: Please Help! In reply to
In Reply To:
However, it only appears on the first page of the category and I would like it on all pages of the category.
Right...that is how the default version of Links SQL works....

You will need to hack the sub build_category_pages in the nph-build.cgi script to show the sub-categories on all spanning pages.

I am not quite sure how to do this...may be you can find some answers at the Links SQL FAQ web site that is linked in the Resource Center...click on Resources in the top menu bar of all forum web pages.

Regards,

Eliot Lee

Quote Reply
Re: Please Help! In reply to
Hi kittymother

Links SQL only prints the subcategorys of a category on the first page. To change this you need to edit the file nph-build.cgi.

Find the subroutine:
sub build_category_pages{

Find the line near the end of the sub:
# Then we go through the list of links and build on the remaining pages.

some lines further down find:
$OUT{links} = ''; $OUT{category} = '';

change this line to:
$OUT{links} = '';

Now nph-build.cgi prints-out the subcategory information on every page.

This little hack applies only to sites building their category pages static. If you are using multiple templates or generating the category pages dynamic via page.cgi you must edit page.cgi similar.

I hope this will help you solve your problem.

regards, alexander

Quote Reply
Re: Please Help! In reply to
Just a little clarification:

Code:
$OUT{links} = ''; $OUT{category} = '';
This is two lines of Perl code, that was put on one line:

Code:
$OUT{links} = '';
$OUT{category} = '';
What you want to do is _PREVENT_ the reset of the value $OUT{category} to null. If you don't reset it, then when a page is built, the <%category%> tag will contain a value and will print out.

If you reset it, the <%category%> tag is null, and won't print out.




http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/