cf_getmeta

cf_getmeta v 1.0
© rmh
6-sept-1999
Freeware
Works with Cold Fusion version 4 and up
Source: cf_getmeta.zip

Use:

This Cold Fusion tag extracts meta tag info from a file and outputs it in a structure containing the meta tag name / content pairs.

syntax:

<CF_getmeta
sourcefile = "[relative path\]file name">

output:

metastruct - a structure containing the meta tag name / content pairs
wholefile - sourcefile with the meta tags stripped out

Limitations:

  1. Meta tags with null content are ignored.
  2. Only the first of duplicate tags is written to the output structure.
  3. The regular expresion which actually extracts the meta tag data from the source file definitely works when the meta tags are in exactly the format:
    <META NAME="name" CONTENT="content">
    which is all I needed this tag for.

    If you want to also extract meta tags in other formats eg <META HTTP-EQUIV="name" CONTENT="content"> or even slight differences like <META NAME = "name" CONTENT ="content"> then the regular expression will need tweaking. (I am not v. good with RE's)

    If you make a decent tweak, please let me know and I will incorporate it in a revised version.


Example:

4 meta tags found in index.cfm

keywords - meta, tags, metatags, meta tags
tag version - 1.0
date created - 06/09/1999 13:40:00
tag name - cf_getmeta