Hello!

I'm working on a (more or less) flexible system with plugins should be installed just like controllers; some basic information about them (particulary, numerical id) must be kept in database.

Plugins should be handle some queries in /admin/service/$servicename

I'd like to put 'smart links' in plugin information table - i.e. if something handles /admin/service/$servicename/control, link exists; if no - instead of link text in different style is presented, telling that plugin has not been installed.

construction like

[% SET path=stype.path %]
[% IF c.can('/admin/service/$path/control') %]
<a href ... >
[% ELSE %]
message here
[% END %]

is ugly; maybe someone points me to some nicer idea? I was thinking of some function in Schema/Result/Servicetype.pm returning link or warning, but how do I access the Catalyst object from it? Or I just have to pass it as argument?

Alex.

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to