Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
897 views
in Themes by
edited by

I am using Snowflat theme & like to customize 'categories' page to be displayed as Tree

E.g.

http://cssdeck.com/labs/pure-css-tree-menu-framework

Also, I would like to add a symbol (+) in front of categories having sub-categories.

How can I do this?

Can this feature be part of 1.8?

Same question is asked on Stackoverflow also : http://stackoverflow.com/questions/40182832/q2a-categories-page-to-appear-as-tree-using-css

Q2A version: 1.7.4

2 Answers

+1 vote
by
 
Best answer
by
If your hope is only adding plus-symbol, it would be sufficiant.
Probably, you already know below issue.
Because we can not refer to all of categories at once, I think current categories page is very inconvenient.
by
Agreed. This is what we have & this is the best we can do using css & js without touching php code...!

But it would have been great to have a plugin (or core feature) to customize categories page... May be core team will think to include this in 1.8???
by
I had to use the following function for the same. May be this can be used by overriding the category page.

function getAllCategoriesSelectSpec()
{
    return array(
            'columns' =>  array('^categories.categoryid', '^categories.parentid', 'title' => '^categories.title', 'tags' => '^categories.tags', '^categories.qcount', '^categories.position',   'content'=>'^categories.content', 'backpath'=>'^categories.backpath',
),
            'source' => '^categories',
            'arguments' => '',
            'arraykey' => 'categoryid',
            'sortasc' => 'title',
            );
}
$q2a_categories=qa_db_select_with_pending( $this->getAllCategoriesSelectSpec() );
0 votes
by
solution from me  , just make a widget categories with manual code .. and then  put the code using widget anywhere plugin ..
by
@muntaha.dede,
Thanks for the reply. But I am new to q2a & not sure how to make a widget for this.
Could you please guide me to procedure.
...