Metadata Function

The metadata function is used to display the metadata for one or more content blocks in the Ektron CMS400.NET Web site. Inserting this custom function allows you to generate the list of metadata that is edited by the authors, and insert it in the source of the Web page. Shown below is an example of what the metadata custom function looks like.:

<?php ecmMetaData ("ItemList","Spare1";) ?>

This function is basically the same as the Metadata function in ASP. See Metadata Function for details.

The only difference between the PHP function and the ASP one is the syntax for implementing it. The PHP examples are below.

To include both content blocks’ metadata in the web page, an ecmMetadata call would look like this.

<html>

<head>

<?php ecmMetadata (“[1][2;Title,Content-Type]”, “”); ?>

(rest of head)

</head>

<body>

(rest of web page document)

</body>

</html>

In the above example the ecmMetadata call is contained in the <head> of the HTML document (since all HTML metadata is required to exist there). Once the Web page is viewed the Web page source will contain the following information:

<html>

<head>

<Title>Welcome to Our Home Page</Title>

<meta name=”Keywords” content= Home; page; company; Welcome; Announce;

product; widget”>

<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1”>

(rest of head)

</head>

<body>

(rest of web page document)

</body>

</html>

<?PHP ecmMetaData ("[1][2]","") ?>

<?PHP ecmMetaData ("[1;title][2;keywords]","") ?>

<?PHP ecmMetaData ("[1][2;title,keywords]","") ?>

Previous TopicNext Topic|