[Catalyst] Virtual file system
vti
mbit at ukr.net
Mon Dec 18 13:40:21 GMT 2006
Hermida, Leandro wrote:
>
> > 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
I was looking for that too. If you find something, please, let us know :)
--
vti -- Viacheslav Tikhanovskii
Wherefore, brethren, covet to prophesy, and forbid not to speak with
tongues.
-- 1 Corinthians 14:39
More information about the Catalyst
mailing list