-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL
78 lines (64 loc) · 3.37 KB
/
INSTALL
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
XML View extension for eZ publish INSTALL
Requirements
============
See the README file
Getting and installing eZ publish
==================
Well, duh!
Installing the "XML View extension for eZ publish" extension
==========================================================
1. Download the package.
2. Copy the downloaded package into the 'extension' directory of your
eZ publish installation.
3. Unpack the files in the distribution.
4. Enable the extension in eZ publish.
Regenerate the extensions autoloads config if enabling the extensin by hand.
5. Clean the template cache
6. (optional) give some users access permission to the xml/xsd view
Testing that it works
=====================
Point your browser to
http://my.ezpublish.site/index.php/siteaccess/layout/set/xml/content/view/xml/2
or http://my.ezpublish.site/index.php/siteaccess/layout/set/json/content/view/json/2
or http://my.ezpublish.site/index.php/siteaccess/xml/xsd
or http://my.ezpublish.site/index.php/siteaccess/layout/set/xml/content/view/xmlmap/2
or http://my.ezpublish.site/index.php/siteaccess/layout/set/json/content/view/jsonmap/2
(please not that the last 2 of these will take quite a long time to generate,
you might want to test on a node that does not have a big subtree of content)
Configuration
=============
. The XSD definition generated by eZPublish content classes is not available by
default to anonmyous access because of security concerns. To display it
correctly you need to be logged in or give access to it to the anonymous user
(in the admin interface, "roles and permissions" tab)
. By default the xml and json views are not cached, which could mean unacceptable performance.
To enable view cache, uncomment the appropriate lines in extension/ggxmlview/settings/site.ini.append.php
. The easiest way to have the xml and json views displayed using "nice urls" is
to create url aliases that point to the system url of those views, eg:
/sitemapxml => /layout/set/xml/content/view/xmlmap/2
Wilcard url aliases can also be used to have one url alias working for all nodes.
Pelase refer to the online eZ Publish documentation for details on creating url aliases.
. The json and xml pagelayouts are able to send a proper 'Content-type'
http header without the need to pass by the layout/set module. This means that
it is possible to have the xml/json view of a node set as default view using
the override system. Example of such a configuration in override.ini.append.php:
[node_xml]
Source=node/view/full.tpl
MatchFile=node/view/xml.tpl
Subdir=templates
Match[node]=XXX
[pagelayout_xml]
Source=pagelayout.tpl
MatchFile=xml_pagelayout.tpl
Subdir=templates
Match[node]=XXX
The benefits of using this method instead of layout/set/xml/content/view/xml/XXX
are many: the view cache will be used by default, it will be possible to use
'nice' urls instead of urls that point to the node id, and it will be possible
to have a siteaccess where the complete site is displayed in xml mode
. If you are using custom datatypes in your website, you will need to
- provide templates for their xml/json representation in content/datatype/view
- modify the template for the xsd file: class/xml_classlist.tpl
Troubleshooting
===============
For any problem or question, please post on the extension forums on projects.ez.no