[Catalyst] Virtual file system
Hermida, Leandro
Leandro.Hermida at fmi.ch
Mon Dec 18 12:49:12 GMT 2006
> From: vti [mailto:mbit at ukr.net]
> Subject: [Catalyst] Virtual file system
>
> Hello.
>
> I was wondering if there is an elegant way to make
> web-navihation looks like your hard drive. For example I have
> materials that could be organazied that way.
>
> \ root
> -> personal
> -> story1
> -> story2
> -> public
> -> ...
> -> ..
>
> Where material belongs_to material, and has_many materials.
>
> And to have example.com/materials/...
>
> So i made up with:
>
> sub root : Chained('/') PathPart('materials') CaptureArgs(0) { }
>
> sub path : Chained('root') PathPart('') {
> my ( $s, $c, @path ) = @_;
> # here is checking through all the path like foreach ( @path
> ) if it # exists in database
>
> And if we come up with the right path we just show it.
>
> When i start web server, i get "/materials/..." in "[debug]
> Loaded Chained actions: section".
>
> Everything seems like great, but how to organize basic CRUD?
> For example i want to add material in some 'folder':
>
> /materials/personal/.../add
>
> But if i understand how Chains work there is no way of doing
> that. And i have to make somethins like:
>
> sud add: Regex('add$')
>
> And it doesn't work for, because I am using language chain,
> and i don't want to mix up with Chains and regulat paths.
>
> Appreciate your help
>
> Thanks for the great framework.
>
> --
> vti -- Viacheslav Tikhanovskii
This brings to mind a related question, is there a module in CPAN which
automatically generates a nice collapsable/uncollapsable hierarchical
tree view inside a web page automatically from an XML or YAML file?
Leandro
More information about the Catalyst
mailing list