First time here? Check out the FAQ!

Revision history  [back]

How do we include "external" templates in our custom skin?

Hi

We've created a custom skin and we're trying to base our skin on templates used elsewhere on our website ie those present in TEMPLATE_DIRS. Is this a bad idea?

It looks like askbot is only looking in the skins directory for templates as it can't find templates in our application. Looking at the SkinEnvironment class in skins/loaders.py, _get_loaders() creates file system loaders for the custom skin directory. We can modify this to append TEMPLATE_DIRS to the loaders and it seems to work. Is there a better way to do what we want? I guess we could use symbolic links from the skin directory to the application templates directory but that seems a bit of a hack.

I suppose ultimately we're looking to embed askbot so that it looks like any of the other pages on our website so tell us if we're going about this the wrong way.