15.08.2013 Views

Ektron CMS400.NET Developer Reference Manual

Ektron CMS400.NET Developer Reference Manual

Ektron CMS400.NET Developer Reference Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Function ecmNavigation($cInfo){<br />

}<br />

global $html, $info;<br />

$html = "";<br />

$mycount = $cInfo->count();<br />

for ($iloop=0; $iloop < $mycount; ++$iloop) {<br />

}<br />

$info = $cInfo->Item($iloop+1);<br />

$html = $html."&nbsp;&nbsp;Item("ContentLinks");<br />

$html = $html."\">";<br />

$html = $html.$info->Item("ContentTitle");<br />

$html = $html."&nbsp;";<br />

$html = $html."";<br />

return $html;<br />

Custom PHP Functions<br />

As you can see, the ecmNavigation function is a simple PHP<br />

function that creates a table of the links that belong to the<br />

collection specified.<br />

The ecmNavigation function also displays the title of the content<br />

blocks by using the “info(“ContentTitle”)) building block.<br />

Example Using the ecmTeaser Display Function<br />

The following is an example of a collection function being used as<br />

a navigation menu in the <strong>Ektron</strong> <strong>CMS400.NET</strong> sample Web site.<br />

<br />

In this example, the collection with an ID=2 is displayed, and the<br />

function “ecmTeaser” is used to define how the collection data is<br />

displayed on the Web page.<br />

Shown here is how the collection would appear on the Web page.<br />

<strong>Ektron</strong> <strong>CMS400.NET</strong> <strong>Developer</strong> <strong>Reference</strong> <strong>Manual</strong>, Version 5.1, Revision 5 502

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!