If you want add rewrite rules in a theme you need to insert them in the database. for example, in the conquistador theme it adds a rule on activation (action_theme_activated) like so: https://github.com/MattRead/conquistador/blob/master/theme.php#L463

with handler of 'UserThemeHandler' and action 'display_archives' it will call 'act_display_archives' in the theme class. https://github.com/MattRead/conquistador/blob/master/theme.php#L480

On 28/04/2013 6:29 PM, Owen Winkler wrote:
On 4/28/2013 5:57 PM, Chris Meller wrote:
It's theme related, so depending on exactly what it does, I'd probably
be inclined to stick it in the theme too. It should work in either
place, but tossing it in a plugin might be worth a try, just to make sure.

It's not possible to create new routes from a theme because Habari doesn't instantiate the theme class until after it knows that it needs to route to one. For example, the Atom feed URL does not instantiate the theme because the theme is not needed for the Atom feed's construction.

Features that require additional URLs should not be added via a theme, but instead from a plugin. If your theme requires a feature (such as a new route) that a plugin provides, it can require the feature using the features defined in the theme XML.

Owen


--
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/habari-dev
--- You received this message because you are subscribed to the Google Groups "habari-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to