Forum: Radiant CMS Why do we have snippets, page-parts and layouts at all?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Laszlo Varga (Guest)
on 2007-02-01 22:56
First, I'd like to say that I am very happy with Radiant as is.

It could be a little simpler than as it is now. I belive that we can
delete from the source add a little, drop some models and tables and
have more functionality.

Pages can have parts and children. Why both? Parts can contain text and
children can too. I could live without parts, I need only a body in
Page.

PageParts:
In /main Instead of
<r:content part="extended" /> one could
<r:find url="/main/extended"><r:content/></r:find>

Snippets:
Instead of <r:snippet name="header" /> one could
<r:find url="/snippet/header"><r:content/></r:find>
Snippets can have structure after the mod, is it so bad?

Layouts:
Each page has an attribute layout, but that's can be just a page. I do
like simplicity but some not. They can have their layout specify yet
another layout.

The unified resource locator should be able to target my created
resources. Right now url can not target a page part or snippet, so my
ssi-cache is defeated because it just can't include in a dynamic part,
it has no url. Also when I do ajax magic I have to defeat page's
rendering not to do layout.

Some day some will say: I can't live without reordering / reparenting my
page parts. Then what. Well we code that too, or let the parts go and
page-reordering / reparenting is almost? done.

The extension mechanism is very promising. I think this is all just an
extension. Some can like it, some not. No hard choices here. Some tags
needs to be reimplemented, some (reversible ;) migration, that's it.

I wonder what was the design consideration behind not to use pages for
all of this. If there is an answer, point me to it.

Laszlo
Jacob B. (Guest)
on 2007-02-01 23:06
I don't follow all of your reasoning, But I would admit there is no need
for Snippets.

With the ability to easily handle different page types in Mental,
"Snippet" could just be another page type.
John W. Long (Guest)
on 2007-02-01 23:10
(Received via mailing list)
Laszlo Varga wrote:
> Pages can have parts and children. Why both? Parts can contain text and
> children can too. I could live without parts, I need only a body in
> Page.
>
> ...
>
> I wonder what was the design consideration behind not to use pages for
> all of this. If there is an answer, point me to it.

Other software has used a unified content approach as you describe, and
while it may have merit a little differentiation is also helpful. In
this case pages, page parts, snippets, and layouts all help to group the
Web site into logical parts that are useful to Web designers.

Mostly, it all just fit the way I think about Web sites really well.

--
John L.
http://wiseheratdesign.com
Jim G. (Guest)
on 2007-02-01 23:10
(Received via mailing list)
If you have a single site that has multiple layouts, yet has the same
items on each layout, then a snippet keeps it DRY.

Example:
1 layout has the navigation on top, another has the navigation on the
left. If they are the same navigation code, you only need to write it
once in the snippet.
John W. Long (Guest)
on 2007-02-01 23:13
(Received via mailing list)
Jim G. wrote:
> If you have a single site that has multiple layouts, yet has the same
> items on each layout, then a snippet keeps it DRY.
>
> Example:
> 1 layout has the navigation on top, another has the navigation on the
> left. If they are the same navigation code, you only need to write it
> once in the snippet.

Snippets are just a nice place to put content that is shared and has no
for a URL.

--
John L.
http://wiseheartdesign.com
This topic is locked and can not be replied to.