Gossamer Forum
Home : Products : Links 2.0 : Customization :

What am I doing wrong??

Quote Reply
What am I doing wrong??
Hi, ok I tried the multiple templates mod but couldn't get it to work. I was told the header and footer would be a better way to go. All I want is to be able to put a different banner at the top and a text link at the bottom of each of my category templates. I have read on here for hours, can't figure it out, offered to pay people to help me put the codes in no luck. Here is what I have done so far in links 2.0.

Put in the enhanced template mod.
In my category.db I put in the header field an <img scr> tag leading to my banner and it shows the banner there.
In the footer I put an <a href> tag that leads to what text will be written in the footer of my category.
In the cat.html I added the <%header%> and <%footer%> where I want the banner and text to be.
I put the codes in the template hit build all, but there is no change, nothing I've done seems to save in the category template I'm working on.

Frustrated is to mild of a word for how I feel. I know this can't be this difficult to do. I won't post my url as this is an adult link list and I don't want to offend anyone. Could someone please let me know what I'm doing wrong? I will be glad to pay anyone that can help me so I can get this project at least up and online. Thanks for listening to me vent and thanks to anyone who is willing to help me. Have a great day..Sue
Quote Reply
Re: [sue/fla] What am I doing wrong?? In reply to
First make sure your'e viewing the new page, not a cache of the old one (hit "refresh").

Quote:
In the cat.html I added the <%header%> and <%footer%> where I want the banner and text to be.


Also, a problem may lie in the template.pm file; there are updates for it in the Resource Section (linked in one of the threads mentioned below), without which you cannot use the header/footer tags.

Quote:

In my category.db I put in the header field an <img scr> tag leading to my banner and it shows the banner there.
In the footer I put an <a href> tag that leads to what text will be written in the footer of my category.


The image path will work, but to have text or a link in the footer, you need to create a text file with the information you want to appear, then enter the path to that file in the footer field. Using these fields AND a header/footer tag is redundant, you only need to use one or the other method, not both.
--

Read these threads for more info:

http://www.gossamer-threads.com/...i?post=259142#259142

http://www.gossamer-threads.com/...i?post=230080#230080

http://www.gossamer-threads.com/...i?post=256382#256382


Leonard
aka PerlFlunkie

Last edited by:

PerlFlunkie: Apr 15, 2005, 11:55 AM
Quote Reply
Re: [PerlFlunkie] What am I doing wrong?? In reply to
Yes I am hitting refresh each time I view the page.

The only template.pm update I could find is the enhanced template which I have already. Do I need to edit something in there?

So I can put what I want in the header and footer fields in category.db and don't have to put the <%header%> and <%footer%> tags in the category.html?

So.. if I just put the <img src> tag in the header in the db and don't use a footer at all. Then in the category I'm working with add the code that I put in the header it should work?

When I read the threads you posted it went into uploading txt files and so on. If I can't figure this simple step how can I figure making txt.files out.
Thanks for getting back to me I appreciate it much. I bet you've never had a newbie like me before..:)
Quote Reply
Re: [sue/fla] What am I doing wrong?? In reply to
Quote:
The only template.pm update I could find is the enhanced template which I have already. Do I need to edit something in there?


No, you're set.

Quote:
So I can put what I want in the header and footer fields in category.db and don't have to put the <%header%> and <%footer%> tags in the category.html?


Yes and no... Below is an outline of what needs to go in the fields, but you do need to use the <%header%> and <%footer%> tags so the script will know it needs to look for the header/footer files.

Quote:
When I read the threads you posted it went into uploading txt files and so on. If I can't figure this simple step how can I figure making txt.files out.


Make the .txt files on your computer (using a text editor), containing just the HTML code you want inserted into the category page as either the header or footer. Then upload (FTP) the file into the proper directory:

/cgi-bin/links/admin/header

The header and footer directories are not part of the basic Links structure, you will need to create them.

----

In the admin, when you add/modify a cat, enter the name of the file you want to use in the header or footer field. Examples:

header1.txt

footer1.txt


Then create the directory you need to put all headers into, and the directory for all footers:

/cgi-bin/links/admin/header

/cgi-bin/links/admin/footer

Then upload the .txt file into the proper directory. The full path would look like so:

/cgi-bin/links/admin/header/header1.txt

The .txt file is basic html, just the code you want inserted into the category page.

----

Quote:
So.. if I just put the <img src> tag in the header in the db and don't use a footer at all. Then in the category I'm working with add the code that I put in the header it should work?


What you can do is just enter the name of the image you want, instead of a .txt file:

image1.gif

Then place the image file just as in the above instructions, but instead of the .txt file:

/cgi-bin/links/admin/header/image1.gif

For this to work right, you should code it like so:

<img src="<%header%>" height="??" width="??">

The <%header%> tag will call in the image name.

Actually, though, your images will likely be different sizes, so you should go ahead and use a .txt file, and make it contain the HTML, so that the <%header%> tag will produce this:

<img src="/images/image1" height="??" width="??" alt="image1">

Yes, you can use just the header, without the footer, and vice-versa.


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] What am I doing wrong?? In reply to
Thanks so much PerlFlunkie so glad I'm getting some help. I understand everything except this:

Make the .txt files on your computer (using a text editor), containing just the HTML code you want inserted into the category page as either the header or footer. Then upload (FTP) the file into the proper directory:

/cgi-bin/links/admin/header

The header and footer directories are not part of the basic Links structure, you will need to create them.

When I make a .txt file with the html code I want for my header. I go to ftp to upload it but there is no file called /cgi-bin/links/header. This is where my confusion comes in as I did not install links 2.0 I hired someone to do it for me. So what do I look for on my ftp to load my .txt into? I'm sorry I'm sure that is a dumb question to you. Thanks!!
Quote Reply
Re: [sue/fla] What am I doing wrong?? In reply to
Your FTP program should have a function to allow you to create directories on your server; go to the admin directory, and inside it make a header directory and a footer directory, and you will then be able to FTP files into them.

It wasn't so long ago that all this was new to me, too, so I understand your confusion. Wink


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] What am I doing wrong?? In reply to
Thanks PerlFlunkie for letting me know your understand my confusion. Makes me feel like I'm not a total idiot! Ok here is where I'm at now, I have these files now:
/cgi-bin/admin/header/cat1=header1.txt

/cgi-bin/admin/footer/cat1=footer1.txt

In my first category.db I have header1.txt and footer1.txt put them in the proper places and hit build all.

I then put the html tag in the category template and added <%header%> and <%footer%> tags after each.

It show up fine has the banner in place and the text at the bottom of my site. But when I hit build all it goes away?? I get a message that detailed_build is not turned on could this be the problem? Do I need to put the header and footer tags in my category.html template?

I named my files cat1=header1.txt because I want a different header and footer on each category did I do that right?

I feel like I'm finally getting somewhere if only I could get it to save! Thanks!!
Quote Reply
Re: [sue/fla] What am I doing wrong?? In reply to
Quote:
Do I need to put the header and footer tags in my category.html template?


Yes, edit the templates, not the files in the WWW part of your site, as they are created/changed on each build.


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] What am I doing wrong?? In reply to
I just wanted to say thank-you PerlFlunkie for your help it's much appreciated Smile