Ask Your Question

Show first lines of a question in question list and search results

asked 2012-11-23 12:53:50 -0500

tux's avatar

updated 2012-11-24 04:53:27 -0500

Is it possible to make askbot show the first lines of questions like it is done in the sx network?

For example like in this screenshot: tex

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-11-27 22:49:01 -0500

Evgeny's avatar

updated 2012-11-27 22:52:46 -0500

Thanks for the suggestion. I need more convincing that this feature is actually necessary, because essentially the "search" page and the listing of questions is the same. I don't like that the same content is shown in two different ways (as in "questions" and the "main" page on stack exchange). Originally CNPROG was coded the same way and I have removed that duplication.

What showing an extra line or two is doing - is trying to compensate for often poor question titles. I prefer to work on encouraging creation of better titles - via specific features and educating users. Perhaps you as a owner of a content site should more often edit the titles to make them better.

That said - this behavior achievable via a custom theme.

edited I think I've misunderstood the question actually. This can be done either via an option or a custom theme.. if this request happens to be popular.

edit flag offensive delete link more


How can I do it via a custom theme?

tux's avatar tux  ( 2012-11-28 12:32:46 -0500 )edit

Sure, create a custom version of templates/widgets/question_summary.html in your theme (in a separate directory). I'd start with a copy of existing template. To access the summary you could use thread._question_post().summary (this may change in the future though, so it may require maintenance down the road).

Evgeny's avatar Evgeny  ( 2012-11-28 12:39:12 -0500 )edit

Would be great to see this as a standard feature. Is there any progress into this direction?

tux's avatar tux  ( 2014-05-31 06:03:03 -0500 )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



Asked: 2012-11-23 12:53:50 -0500

Seen: 227 times

Last updated: Nov 27 '12