Plugin Method addToPageHead()

public function addToPageHead() {
    
    //...your PHP code...//
}

Summary

You can use this method to add HTML to the page's head.

Where You Can Use It

In your pluggable modules, from Zenario 7.0 onwards.

Description

This method allows you to output HTML to the page's head. For example, you might want to add an RSS link.

Depending on how you use this, your plugin might not work with AJAX reloads. If you need to add CSS, the skin is a better place to put this.

Return Value

No return value is needed.

Example

public function addToPageHead() {
    if ($this->setting('enable_rss')) {
        echo '
            <link
                rel="alternate"
                type="application/rss+xml"
                href="'. $this->showRSSLink(). '"
                title="'. htmlspecialchars($this->core->getContentItemTitle(
                    $this->cID,
                    $this->cType,
                    $this->cVersion)). '" />';
    }
}

This example can be used in conjunction with the showRSS() method to show an RSS link.