Ask Your Question
1

How easy does Askbot make it to customize its HTML?

asked 2010-04-22 14:23:29 -0600

Pekka gravatar image

updated 2010-04-22 14:23:54 -0600

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2010-04-22 17:01:31 -0600

Evgeny gravatar image

updated 2010-04-25 21:20:35 -0600

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 settings_local.py.

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.

Cheers.

-Evgeny.

edit flag offensive delete link more

Comments

Great Evgeny, thanks!
Pekka gravatar imagePekka ( 2010-04-23 03:35:12 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2010-04-22 14:23:29 -0600

Seen: 769 times

Last updated: Apr 25 '10