First time here? Check out the FAQ!

How easy does Askbot make it to customize its HTML?

Does Askbot have a half-way clean basis to customize the site's appearance? What I'm seeing from outside looks good, all the elements have distinct classes and IDs, which makes most things possible already.

Is the HTML code separated from the application's code base? Is it easy to switch templates? Could somebody familiar with the project maybe point me to an example of where the HTML is stored in the github repo?

Thanks in advance.

Pekka's avatar
updated 2010-04-22 14:23:54 -0500, asked 2010-04-22 14:23:29 -0500
edit flag offensive 0 remove flag close merge delete


add a comment see more comments

1 Answer


edit: there are two caveats though - (1) it's best to localize customizations to css whenever possible, because there will be changes in url parameters, template tags and template variables; (2) there is a bug in the javascript skin media resolution - because of it at this point you should copy entire base skin (currently there is only "default") - templates and media - into your own.

Hi Pekka, HTML is stored in the django templates and is easy to modify.

The newer look is only available at the experimental branch called "common-question-view" (I'll add instructions on how to get it a bit later - generally it's git clone, fetch that branch and check it out) now in the master branch. I also seems to work well in IE7-8 but with some issues in version 6 (works well with FF & Chrome).

Instructions for creating new skins are described here (btw - the general system is probably the same as in OSQA at this point).

Skins are switched by setting ASKBOT_DEFAULT_SKIN to a particular name by editing file

You will not have big issues maintaining your own templates unless you decide to depend on some from skin 'default' - so it will be best if you copy "default" to your own within the same directory though - forum/skins. At this point skins cannot be placed to an arbitrary directory - but it may be possible with re-configuring django a bit - I'll doublecheck on this today-tomorrow.

The plan for near future is to minify HTML in the default skin and come up with a good naming convention for id and class names of "business" elements - so that users could easily maintain their own templates and stylesheets without confusions. Javascript within skin media will also change - as element finding sometimes heavily depends on descendant selectors.

So it will be best to copy "default" skin entirely (both media and templates) into a new one if you are not willing to wait until default skin is considered ready.



Evgeny's avatar
updated 2010-04-25 21:20:35 -0500, answered 2010-04-22 17:01:31 -0500
edit flag offensive 0 remove flag delete link


Great Evgeny, thanks!
Pekka's avatar Pekka (2010-04-23 03:35:12 -0500) edit
add a comment see more comments