Dev:Theming Best Practice

From Habari Project

(Redirected from Dev:Themeing Best Practice)
Jump to: navigation, search


Style drafts differently

Call appropriate header and footer functions


<?php $theme->header(); ?>
<?php $theme->footer(); ?>



Provide a password reset link

If your theme provides a custom login page, you should consider providing a link to allow users to reset their password. Otherwise they can be locked out.

Pay attention to performance

First, you have to get the design you want, but after things are looking good and working correctly, some things can have a major impact on performance.

  • In your Theme class declaration, prefer to override Theme::add_template_vars() rather than modifying it's results through action_add_template_vars(). If you do any intensive amount of initialization, this can have a large impact on performance.
Personal tools