Click to See Complete Forum and Search --> : Meta tags
neall24
10-27-2004, 05:40 AM
Could anyone please if it’s possible to create a centralised set of Meta tags for an entire website which work in the same way as a stylesheet (i.e. 1 file contains the metadata and all other files link to is to use the code).
Thanks
Neall McLaren
ICT Assistant - Yes2Work Linited
ray326
10-27-2004, 02:02 PM
Only if you're generating your pages on the fly.
You can use server side includes in your <head>. This articles explains it:
http://www.wdvl.com/Authoring/SSI/Intro/include.html
Remember though, that all the meta tags will be the same for each page. You won't be able to add certain words for individual pages.
spufi
10-27-2004, 03:57 PM
Originally posted by LeeU
You can use server side includes in your <head>. This articles explains it:
http://www.wdvl.com/Authoring/SSI/Intro/include.html
Remember though, that all the meta tags will be the same for each page. You won't be able to add certain words for individual pages.
However, if you are already using something like PHP, you can define such a thing within a function instead and then pass it parameters so the meta data changes based on the what you send it via the parameters. What I'm doing for my current site idea is creating a class for the every page basics of the site, and then externally linking to it on my pages.
That sounds interesting. I would be interested in seeing something like that when you're finished.
spufi
10-27-2004, 05:09 PM
When I'm finished. (chuckles) :D
Here's a quick example. Let's say you have parts of your site that are updated more often then the rest of your site. Because of this, you want those parts to have a different "revisit" setting. Let's take your news section as being the obvious choice that it needs to be revisited more often. When a person goes to your news page, you grab the URL, and extract the word news from it. You then use that word to search your DB in your "meta" table. Once you find the news row, you then use the data to fill in the field for how often the page should be revisited. In all honesty, you don't really need to pass the news field to the function in that instance because you could figure it out inside of the fuction itself. Anyway, you can use the same concept to limit robots to certain pages, change the description attribute, <title> tag, etc.