Jump to content

Hyperlink in template file


raydona

Recommended Posts

Hi,

  I wish to create about 200 web pages (html) files. Each file will have a hyperlink (<a href="http://......) to another site. Normally you would place the hyperlink in the html file. But if I had to change the address to a different site I do not fancy going through each and every file changing the hyperlink. Is there any way I can place the hyperlink in a CSS file so that if the

address changes I would have to just alter it once in the template CSS file and it would alter the address in all the html files. All help will be greatly appreciated.

Link to comment
https://forums.phpfreaks.com/topic/185641-hyperlink-in-template-file/
Share on other sites

Do you have PHP on the server?

 

If so you can link all the CSS to a PHP script and use header's / ( file_get_contents or cURL) to grab the css from the remote site and output that CSS.

 

If you do not have PHP on the server, I hardly doubt that without some form of a server side scripting language this would be possible (unless you use server side includes SSI).

hmmm.... no edit button??

 

on second thought

 

put this on your page where you want the link

<script src="link.js" type="text/javascript"> </script>

 

 

us the doc.write in the external file

    document.write('<a href="link.html">MyLink</a>')

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.