Nested view items

26 views
Skip to first unread message

Brettski

unread,
Jan 23, 2012, 5:39:43 PM1/23/12
to framework-one
Hi,

So I want to have in my URL an admin section and a "normal" section
e.g

/admin/quotes/view/123
/admin/files/view/321

/quotes/new
/files/new

If I do this with subsystems, it will become

/admin:quotes/new

Is this correct? Is there a way to do this with a folder structure in
views?

Sean Corfield

unread,
Jan 24, 2012, 9:23:04 PM1/24/12
to framew...@googlegroups.com
Sounds like you want routes. See
https://github.com/seancorfield/fw1/wiki/Developing-Applications-Manual
section "URL Routes" about two thirds of the way down.

Brettski

unread,
Feb 5, 2012, 8:38:56 PM2/5/12
to framework-one
Thanks Sean,

BTW I love this framework, so intuitive and clear, and saves me time
writing lots of xml config from a framework I won't mention :)

I got it to work, but like you said will involve something like this.

variables.framework.routes = [
{ "/db/new" = "/db:db/new" }
];

This works, but I guess I wanted to confirm the trade off for this
would come at the cost of some routing setup versus just using the
pure subsystem url approach?



On Jan 25, 1:23 pm, Sean Corfield <seancorfi...@gmail.com> wrote:
> Sounds like you want routes. Seehttps://github.com/seancorfield/fw1/wiki/Developing-Applications-Manual

Sean Corfield

unread,
Feb 5, 2012, 10:50:56 PM2/5/12
to framew...@googlegroups.com
On Sun, Feb 5, 2012 at 5:38 PM, Brettski <brett...@gmail.com> wrote:
> I got it to work, but like you said will involve something like this.
>
>  variables.framework.routes = [
>      { "/db/new" = "/db:db/new" }
>    ];
>
> This works, but I guess I wanted to confirm the trade off for this
> would come at the cost of some routing setup versus just using the
> pure subsystem url approach?

It will have a minimal overhead - as would any use of routes. Not
worth worrying about compared to everything else your application will
be doing :)
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

Reply all
Reply to author
Forward
0 new messages