Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

easy way to add footer style links to pages? 1

Status
Not open for further replies.

ZeBozette

Technical User
Sep 29, 2003
35
US
We'd like to add links running horizontally to the bottom of all our pages as a sort of footer. Is there any way to avoid having to edit each page to add the actual links? Maybe a template?
 

If you want each page to have links you'll have to edit each page to have them. You can't just ethereally add links to pages without modifying them.

even using a Template you'd need to modify the pages to actually be using it.

You can however have single footer file and include that into each page with a minimal amount of code.

Something close to:
Code:
  <!--#include virtual="/footer.html" -->
If you server allows server side includes.

O using a server side language such as PHP or ASP should your server also support them.


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Oh geez.. excellent point that I'll have to modify each page either way.. add the footer links or add a link/reference to the template. I should've known that! I really didn't think there was such a thing as psychic coding. Honest!

Having a separate footer file sounds like exactly what I want. There's a good chance the links will change a few times before we settle on the final list. Thanks for that idea.

Boze
 
No Prob.

And keeping a single footer file will make editing that much easier. As you only have to edit the links in a single location and the pages will automatically update when they are visited as they'll load the updated file.



----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
You should be able to use a Search And Replace tool to batch process all the files and add the footer code in, I user Advanced Find & Replace ( or TextPad ( for this depending on the complexity of the files I am working with.

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
Thank you! I didn't know you could Find and Replace in a batch. I use Notepad++ mostly. Advanced Find & Replace looks like great tool
 
Is there any specific feature you like? For example in Notepad++ I like that selecting an opening tag automatically highlights the end tag.
 
All tools have their uses and pros and cons. I like the syntax highlighting and regex functions etc in TextPad, but there is similar functionality in many similar products so you should try a few out on demo and see which one suits you.

The same thing applies to AFR, there are many other ways to do it to - e.g. if you find all the files in question you can open them all in TextPad and use the Replace tool in there - so again just look about and find a tool that suits you and your skill level.

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
I could not get <!--#include virtual="/footer.html" -->
to work
It lead me to the option of using
<object data="/footer.html" type="text/html" width="100%" >
alt : <a href="/footer.html">footer.html</a>
</object>
This works in Firefox, Safari for Windows, Google Chrome but not and IE6 or IE8. Is it a known issue that this doesn't work in IE? And maybe there's a known workaround?

Thanks
Boze
 
By default, Server Side Includes will not work in the html files. You will have to change the extension to .shtml to have the files run through the SSI interpreter. Or, reconfigure the server to send .html files through the interpreter as well.

What is the extension of the file that has include statement in it?

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
I think you fixed it! I was using .HTM so saved it as .SHTML. Now it works with IE6. I'll check IE8 in the morning.
Thank you, thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top