How to create a static page to an existing ez system?

Author Message

Anoop V

Tuesday 15 September 2009 12:21:45 pm

I have a website say xyz.com running in ez publish.I want to create an entirely new static html page say "info.html" page(which has its own images,javascript,css etc..).So after adding this page the url "xyz.com/info.html" should display this page.Thanks in advance.

Patrick Kaiser

Tuesday 15 September 2009 3:10:03 pm

Two options:

1) Via eZ publish:
- Create a new Object (e.g. from Folder class) with desired name, e.g. http://xyz.com/info
- Create an override rule in override.ini.append.php for this newly created node

# Override for my static page
[static_page]
Source=node/view/full.tpl
MatchFile=my-static-page.tpl
Subdir=templates
Match[node]=<node_id>

- place your template in yourdesign/override/templates/my-static-page.tpl and put your desired html-code in it
- you may also want to have a different pagelayout.tpl, so repeat the last two steps for pagelayout.tpl
- clear the cache

2) via apache:
- just place the info.html, images + css where you want on your webserver, e.g. /info.html /info/styles.css /info/image.png
- update your apache rewrite rules and add the following to your vhost config:

RewriteRule ^/info\.html - [L]
RewriteRule ^/info/.* - [L]

Hope this helps.


Best regards,

Patrick

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.