interchange / Dancer-Plugin-Interchange6

Dancer Plugin for Interchange6 shop machine
4 stars 1 forks source link

Remove template from Navigation? #19

Closed hexfusion closed 10 years ago

hexfusion commented 10 years ago

We talked about moving template from navigation and having it be an Attribute which is part of my pull request. But we still have a call Dancer/Plugin/Interchange6/Routes.pm line 311

'return template $nav->template || $routes_config->{navigation}->{template}, $tokens;'

It would be nice to have access too something like find_attribute_value here so

return template $nav->find_attribute_value('template') || $routes_config->{navigation}->{template}, $tokens;

For now we could even just stick with the config.

$routes_config->{navigation}->{template}, $tokens;

racke commented 10 years ago

Ok, works for me. But we should add a proper test for it.

Regards Racke

racke commented 10 years ago

It seems sensible to me to retrieve all attributes for the navigation object and pass them inside $tokens. Also we use the template attribute for the template name. "Standard" attributes as meta_description should be documented as such and their purpose.

hexfusion commented 10 years ago

agreed

racke commented 10 years ago

Fixed in 84247f1cab6690f6f5c5a3dbd79b1a84358f0f1a