Go to content Go to blog navigation Go to link heaven

Templation

Recent Updates

Recent Articles

Search

RSS feed Atom feed

Unusual Meta Tag Locations

2005.10.22 00:17

How does Templation gather meta data? PHP's get_meta_tags() function, which is not a true parser in any sense of the word. It doesn't check the context, it just grabs anything that looks like a meta tag throughout an entire file. This is good news!

You can embed meta tags in a PHP comment like so:

//<meta name="parse_me" content="false" /> 

Why would you want to do this? The core difference is that this won't be output at all. Normal meta tags are always output because Templation doesn't distinguish between Templation-centric tags vs. standard meta tags (eg. description, keywords, etc).

In my case I was outputting a m3u playlist where extraneous output is strictly forbidden. You'd think I could just remove the Templation include from the top of the page, but I have numerous PHP environment customizations in my Templation settings file that were needed for this script. Placing a hidden meta tag like this was an ideal solution.

Comments