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

Custom headers

Quote Reply
Custom headers
I have a question about modding LInks Sql, perhaps someone else has already done this and have made it available somewhere.

What I would like to do is to make custom headers for other sites to use our links sql site so that it looks more like their site, I know, or think that you can pass a template value to the urls to choose a specific template set, but Im thinking more along the lines of just using headers and footers for the site and leave all the actual pages very generic so that they can be used with any site that uses the headers and footers to make the site look like their own custom version.

Has anyone tackled this yet?


"I've got if's pretty good, but that's about it"
Quote Reply
Re: Custom headers In reply to
People have requested this many time with Links 2.0, with limited success.

Here are some suggestions:

Header and Footer Fields in Links Table

* Add two fields called Header and Footer in the Links table.

* Then add the fields in the add and modify template files.

* Then in the detailed.html file, add the following codes:


<%if Header%>
<%ifnot Header%>
<%include header.txt%>
<%if Footer%>
<%ifnot Footer%>
<%include footer.txt%>

Custom Fields in Another Table

* Create another table with custom fields for the header and footer file called Custom_Fields.

Example of this table should look:

In Reply To:

$Custom_Fields = qq~
CREATE TABLE Custom_Fields (
Logo CHAR(255) NOT NULL,
Bgcolor CHAR(6) NOT NULL,
Background CHAR(255) NOT NULL,
Menu TEXT,

* Then create different add.cgi and modify.cgi scripts with different template files.

* Then in the sub build_detailed_view routine, you will need call data from the Custom_Fields table.

If you are using detail.cgi, then you will have to get the data from the Custom_Fields using the ID (Link ID) and $db->get_record....

Hack Detailed.html Template File

* Simply add fields from the Links table in different sections of the detailed.html file.



<%if Title%>


Eliot Lee