On Jun 13, 2007, at 2:00 PM, Oliver Baltzer wrote:
> Brian Gernhardt wrote:
>> / (Virtual Domain Page)
>> /main-site
>> /main-site/site.css
>> /other-site
>> /other-site/site.css
>> /other-site/main.css (Alias Page) (to /main-site/site.css)
>>
>> This would allow certain pages in the "other site" to look like the
>> main site (an organizational theme to override a site theme, for
>> example). However, doing Page.find_by_url('/main.css').url (from the
>> other-site host) will return "site.css", which is horribly
>> incorrect.
>
> I am not sure I understand this. If main.css is an alias page, its
> model
> should make sure that it returns the alias's canonical URL instead of
> the destination page's URL.
Not in the way that I wrote the alias page. My Alias Page extension
simply returns the source page directly rather than attempting to re-
route and correct method calls. This was primarily done for
simplicity, as all I had to implement was find_by_url to return pages
from a different portion of the tree. But even if I did that, then
the children of the aliased page would be problematic.
The current design allows children of the AliasPage to override pages
of the source Page. The idea was for directories that contain mostly
the same information (CSS pages?) to be copied across sites but still
have local customizations. If I had to correct the url method of
these, I'd have to do some odd trickery with creating AliasPage
instances that don't exist in the database.
The Alias Page I wrote is amazingly simple and useful. If the core
team decides that it's fundamentally flawed in some method that
requires me to change it, I understand. But I simply used it as an
example near to my heart. Changing Radiant to have "One True URL"
for pages limits the power of virtual pages and extensions, and
that's all I wish to speak against.
~~ Brian
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant