tedivm / mortar

Automatically exported from code.google.com/p/mortar
0 stars 0 forks source link

Distinct treatment of "directory-type" location models #106

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Some location model types (like Site, Blog, Directory, etc.) function more 
like containers than content -- they generally don't have a "content" 
field (and therefore redirect to a "default" content model underneath 
rather than display on their own), they have specific model types they can 
contain as children, etc.

To better support treating these types as mechanically distinct, a static 
flag along the lines of "$isContainer" should be added, so that several 
distinct features can be added that, when enabled, will apply only to 
container-type models:

* Automatic aliasing for display of the "default" model, if present, at 
the container's URL rather than its own.
* Use of directory-style URLs rather than file-type URLs (so that you 
don't have situations like site.com/blog/entry-1.html but site.com/
blog.html)
* A Location class static method that returns a Location's "container 
head," i.e. the last container at or above its location (this could be 
used as a parameter for templates so that both site.com/blog and site.com/
blog/entry-1.html would use blog/ as the base for dynamic navigation tags.)

Original issue reported on code.google.com by charlequin@gmail.com on 9 May 2010 at 12:53