Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

Header & Footer In Adding New Category

(Page 2 of 2)
> >
Quote Reply
Re: [hairy] Header & Footer In Adding New Category In reply to
OOH I think I've got it!

Or, at least, I know the problem, but don't know why it's doing it.

When I modify the category and rebuild, it overwrites the html file that's in the category directory, and brings back the broken code.

So, if I "fix" the index.html file and upload it, everything is fine, but as soon as I do a build, it overwrites it back to the page with broken code.

So, something somewhere isn't updating correctly, or a path is wrong I guess, and it's pulling the wrong page from godnose where.

Make more sense?



I'd like to be alone in a room, and enjoy the company.
Quote Reply
Re: [hairy] Header & Footer In Adding New Category In reply to
When you 'fix the index.html file' do you mean the one created by Links, or something in the template directory. If there is something amiss in you templates (you are using templates?), then yes, every rebuild will re-create the error. What are doing when you 'fix'?

We have been through those very frustrating times with script (well, many of us have), but it's a learning experience...Pirate


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Header & Footer In Adding New Category In reply to
In Reply To:
When you 'fix the index.html file' do you mean the one created by Links, or something in the template directory. If there is something amiss in you templates (you are using templates?), then yes, every rebuild will re-create the error. What are doing when you 'fix'?

We have been through those very frustrating times with script (well, many of us have), but it's a learning experience...Pirate


By "fixing" it I fix that broken <br< tag .... but ... is not section in the admin panel to fix the templates that the categories create under each category ... so I ftp in, grab the file, fix it, upload it, and as soon as I do a build, it goes back to the broken file.

When I created a category, under /links in my root directory, it creates a directory with that category name. In each of those is an index.html file, which is where I place the <%footer%> tags....



I'd like to be alone in a room, and enjoy the company.
Quote Reply
Re: [hairy] Header & Footer In Adding New Category In reply to
AH HA!!

You need to make the fix in the template file! In the template directory, find category.html, add the header and footer tags in there. You can easily do this through the admin, just click the 'edit templates' link on the left.



gettin' warmer... Smile


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Header & Footer In Adding New Category In reply to
OH OH OH!

SO then I don't have to edit each category's index.html file .... it gets that from the category.html file?

And I only have to make a category.txt file, put it in /header or /footer?

My hero!

Thank you :)



I'd like to be alone in a room, and enjoy the company.
Quote Reply
Re: [hairy] Header & Footer In Adding New Category In reply to
Correctimundo! One of the features of this approach is the option to have different header or footer files for different categories, if so desired. Just put the name of the file you want to use in the correct field in the add/modify cat form.

Success?Sly


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Header & Footer In Adding New Category In reply to
Well, I'm back to this thread :)

<br>
<br>
<%Footer%>
<br>
<br>

I put this in category.html where I want the footer file to show up.

<!-- Related Categories -->
<%if related%>
<h2>Related Categories:</h2>
<ul><%related%></ul>
<%endif%>
<!-- end main-->

<br><br><%footer%><br><br>

</div>


Unkown Tag: Footer


(yes, it spits out 'unkown')

No matter where I put that tag ... Unkown Tag: Footer



I'd like to be alone in a room, and enjoy the company.
Quote Reply
Re: [hairy] Header & Footer In Adding New Category In reply to
Look in site_html_templates.pl, at the top of the file are listed some 'globals'. Add this to it:

footer => $footer

Same for header, if you want it. Note that each item will have a comma after it, EXCEPT the last item, so if you add the above tag to the end of the list, add a comma to the item above it. Also, these are case-sensitive, so Footer will not work.


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Header & Footer In Adding New Category In reply to
Well

That removed the error -- but -- now the footer file won't show up. All that shows is the space for the break tags, the banner which is supposed to show doesn't

This is what I have:

<!-- Related Categories -->
<%if related%>
<h2>Related Categories:</h2>
<ul><%related%></ul>
<%endif%>
<!-- end main-->


<br>
<br>
<%footer%>
<br>
<br>

</div>
</td>
</tr>



I'd like to be alone in a room, and enjoy the company.

Last edited by:

hairy: Dec 3, 2003, 4:41 PM
Quote Reply
Re: [hairy] Header & Footer In Adding New Category In reply to
Checking the page where the footer should be, all I see is this

<br>
<br>

<br>
<br>



I'd like to be alone in a room, and enjoy the company.
Quote Reply
Re: [hairy] Header & Footer In Adding New Category In reply to
Fixed.

Commented out the => $footer thingie and now it works



I'd like to be alone in a room, and enjoy the company.
> >