Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

Category and Subcategory in Questionlists

+2 votes
asked Oct 22, 2013 in Q2A Core by anonymous
reshown Oct 23, 2013

Is it possible to show category and subcategory in question lists like:

postet 10 minutes ago in qhysics/quantumphysics by user

commented Nov 21, 2014 by joel
still wanting for this answer any one doing this?

1 Answer

+1 vote
answered Jan 16, 2015 by elyou

within your main_part function in the qa-theme class look if you find something like this

            elseif (strpos($key, 'q_list') === 0){

if so then change it with the following one

elseif (strpos($key, 'q_list') === 0){
                foreach($part['qs'] as $key => $value){ //jdev this should set cat url on each question
                    $part['qs'][$key]['catpath']= implode('/', array_reverse(explode('/', $part['qs'][$key]['raw']['categorybackpath'])));

now within each question you have a key named catpath that you can display

i don't know which theme you use so i hope  this help you.

this should work on the defaults themes