-
Notifications
You must be signed in to change notification settings - Fork 10
/
README
52 lines (34 loc) · 1.69 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Content Type Mappings
------------------------------------
Version: 1.3
Author: Alistair Kearney ([email protected])
Build Date: 30th July 2009
Requirements: Symphony 2.0.6 or greater
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.
[CHANGE LOG]
1.3 - Using new Symphony delegate, FrontendPreRenderHeaders. Old delegate was triggering after headers were rendered.
1.2 - Fixed to work properly with Page::addHeaderToPage()
1.1 - Symphony 2.0.5 compatibility upgrade
- Force download option (thanks to ashooner)