On Thu, May 17, 2007 at 02:39:44PM -0400, John Goulah wrote:
> Theres probably not one specific answer for this, but I was curious on
> peoples opinion. I'm basically trying to figure out what is the best way to
> create componentized views, such as Mason components allows you do reuse
> pieces of the page that are cachable. Would this basically be done on the
> template level pulling in pieces of various smaller templates into a bigger
> wrapper like template, and forwarding (or perhaps chaining) within the
> controller to gather the data that gets passed into it? What are peoples
> thoughts on the best way to reuse as many parts of the page as possible when
> certain pieces are used on many pages within the app?
$c->stash(context_menu_template => 'ctx_menu');
$c->stash(context_menu_data => { entries => [EMAIL PROTECTED] });
then in main template
[% INCLUDE $context_menu_template data = context_menu_data %]
and in template 'ctx_menu'
[% data.import;
FOREACH entry = entries;
...
END; %]
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/