Skip to content

Allows more control over the Symphony frontend page content type mappings.

License

Notifications You must be signed in to change notification settings

ashooner/content_type_mappings

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Content Type Mappings
------------------------------------

Version: 1.0
Author: Alistair Kearney ([email protected])
Build Date: 30th April 2009
Requirements: Latest Symphony Integration code.

Allows more control over Frontend page content type mappings. Each mapping is 
stored in the Symphony config file, and page type is matched against these mappings.


[INSTALLATION]

	* You must be running the latest Symphony code from the git Integration branch *

	1. Enable the extension
	2. Add content type mappings to your /manifest/config.php file with 
	   the format 'TYPE' => 'CONTENT-TYPE', E.G.:

			###### CONTENT-TYPE-MAPPINGS ######
			'content-type-mappings' => array(
				'xml' => 'text/xml; charset=utf-8',
				'text' => 'text/plain; charset=utf-8',
			),
			########

	3. If a page uses a type listed in the config, that appropriate content type will
	   be set. Should more than one match be found, the last one encountered will be
	   used.


[CONTENT DISPOSITION]
	To force download of a page (by setting the Content-Disposition header), give it a page 
	type that begins with a '.'. The page will be downloaded with a filename = $page-handle.$type.
	For instance, a page with handle 'form-data' and a page type of '.csv' will be downloaded as
	'form-data.csv'.
	
	Depending on the Content Type you map to a page type, it may not be necessary to add this
	Content-Disposition header in order to cause the page to download.
	

About

Allows more control over the Symphony frontend page content type mappings.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%