Author:
Henry
Version:
1.1
Released:
4 June 2012
Category:
Other

Description

Custom Page Headers Symphony Extension

  • Version: 1.1
  • Author: Henry Singleton
  • Build Date: 04 Jun 2012
  • Requirements: Symphony 2.2.5 - Symphony 2.3.x

Overview

This Symphony CMS extension allows you to define headers by page output. This lets you build headers using data from datasources or other page information. Anything that's accessible from a standard page really!

Great for generating redirect urls for 301/302 redirects if you need information from existing Symphony entries, or want to store redirect stats via an event etc.

Installation

  1. Upload the 'page_headers' folder in this archive to your Symphony 'extensions' folder.

  2. Enable it by selecting the "Page Headers" extension, choose Enable from the with-selected menu, then click Apply.

Usage

  • Create a new page, and give it a page type of 'headers'.
  • Make the page output plain text that you want for your headers. If you also want to output actual page content in the message body, simply separate your headers by a blank newline (as per the HTTP spec for separating message headers/body).

Notes

If HTML/XML is detected at the start of the page output, the extension will not do anything, even if the 'headers' page type is set.

Example

Create a new page, give it a page type of 'headers' and save the following as the page template content:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml"
    omit-xml-declaration="yes"
    encoding="UTF-8"
    indent="yes" />

<xsl:template match="/">
    HTTP/1.1 301 Moved Permanently
    Location: http://www.google.com/
</xsl:template>

</xsl:stylesheet>

Changelog

  • 1.0 Initial release
  • 1.1 Updated extension.meta.xml to include namespace for Symphony 2.3 compatibility. (Thanks to andrewminton)

Repository

https://github.com/henrysingleton/page_headers

Discuss this Extension

Screenshot

screen-shot-2012-06-04-at-8.55.51-1338764234.png

Compatibility

2.7.10 Unsure
2.7.9 Unsure
2.7.8 Unsure
2.7.7 Unsure
2.7.6 Unsure
2.7.5 Unsure
2.7.4 Unsure
2.7.3 Unsure
2.7.2 Unsure
2.7.1 Unsure
2.7.0 Unsure
2.6.11 Unsure
2.6.10 Unsure
2.6.9 Unsure
2.6.8 Unsure
2.6.7 Unsure
2.6.6 Unsure
2.6.5 Unsure
2.6.4 Unsure
2.5.4 Unsure

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details