Site Design - the 'right way' to do it...

Author Message

Ben Pirt

Friday 11 July 2003 6:53:29 am

Hello all,
Having installed EZPublish 3.1 and spent a little time understanding it, I have come to the point of actually implementing the site structure, which is where I have some questions for those more experienced.

In a normal, non URL-rewritten setup I would have folders for different sections with an index.(php, html, etc.) file in each one so that this content is the index page for the subsection. i.e.

/information --> /information/index.php
/products --> /products/index.php

and then having named files within that folder as subsections
/products/new.php
/products/old.php
etc

thus keeping the url nice and tidy and making sense with the structure of the site.

With EZPublish, I noticed that there are folder objects, but was thinking that this is a notional idea anyway and could replace folders with objects that contain content. i.e.
in the EZPublish site structure there might be;

products --> object with content
-------old -->object with content, under products
-------new -->object with content, under products

and so on. Of course it is possible to recreate an old style site structure but it seems pointless, since any object can act in the same way as a folder (i.e. other objects can be made it's children)

So I was wondering (if any of this makes sense to you) what you would recommend as a good set up.

I realise that the pretty URLs can be done with further set up, any links to tutorials of how to do this would be much appreciated. Thanks,

Ben Pirt

Karsten Jennissen

Friday 11 July 2003 7:03:00 am

Hi Ben,

you are right, any object can function as a parent for other objects, so you don't really need a 'folder' object for this.

Actually this is more of a conceptual decision. The only practical issue here is the way, the parent object gets rendered. You have some templates for folders and some templates for other content classes. So if think about what would work best for your rendering templates, which would be the cleanest or the easiest to implement (depending on your preference).

My answer to you therefore is, it is up to you. :-) Do what ever you like best. The templating is flexible enough for both alternatives, if you use 3.1 with the override.ini control.

Info on pretty URLs:
http://ez.no/developer/ez_publish_3/documentation/customization/tips_tricks/creating_nice_urls

Karsten

Ben Pirt

Friday 11 July 2003 7:09:22 am

Thanks for the speedy response Karsten.
I have created a "simple page" class which just has a title, body text and an image. Is there a way of changing the class type of the root folder to this new class or should I delete the root folder and make a new object at the root? I tried this once and things got slightly confused because the root object id was no longer 2 and so the default view became messed up.
all the best,
Ben
PS reading the URL info now, thanks.

Ben Pirt

Friday 11 July 2003 7:16:13 am

OK, I've had a look through the reference on creating nice urls and that is exactly what i'm looking for. It all makes sense, but just one question: It mentions the 'url_alias' field for the requested node. Where does this value come from? is it the 'identifier' which is entered when creating the object, or something else?
cheers,
Ben

Karsten Jennissen

Friday 11 July 2003 7:22:50 am

I think (no guarantee) that the url_alias is automatically created from whatever is set as the "object name pattern" in the content class definition. In most cases, it's the title of the object. In automatic generation, the url_alias string is converted to a-z + _.

Ben Pirt

Friday 11 July 2003 8:24:43 am

makes sense. any more ideas on how to change the root node class type?
cheers,
Ben

Karsten Jennissen

Friday 11 July 2003 8:35:12 am

Kinda forgot to answer that part of your question. ;-) I am not sure what implications deleting the root folder and replacing it with your custom class has, but in this case, I probably would leave the folder class in place and try to work around by changing the node 2 (root) template via override. You could for example put your custom object in a different place (node) and then use node_view_gui on that node with an override template for the root folder node. Hope you understand what I am trying to say. ;-)

Ben Pirt

Friday 11 July 2003 9:23:15 am

That seems to make sense. Effectively I keep the data for the root node somewhere else, and manually put it in when I look at the root.

This will work, but it doesn't seem like the most elegant solution for a couple of reasons. I was hoping to automatically generate urls (menus, etc) from the structure in the database, but this will mean that the object with the root data would appear as one of these sub pages. i.e.

root_node --> gets it's data from "root_node_data"
------ root_node_data --> contains data for root_node
------ information
------ products

root_node_data would show up as a subsection of the site. I could put some data in the description field for the folder and then use that perhaps? or maybe I just make a manual menu system and don't dynamically generate them. Could I modify the 'folder' object? or would that just create more problems than I realise?

all the best,
Ben

Matthew Knell

Thursday 07 August 2003 8:52:18 am

Sort of off topic, but does it make more sense to establish the homepage as something OTHER than the root folder page? My homepage takes a lot longer to load than the rest of the site - but i'm assuming that's only because it's running through all of the setup and authentication code.. Any advice is greatly appreciated.

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