Support Forum

In forumview, show the "sub forums" below the parent forum.

TY tyeung
tyeung
Member

Hey guys!   Things are coming along nicely with v5 =)

 

Any way to modify the spforumview file so that the Subforums appear below the main “parent” forum header?  In pic below, you can see my technical forum “intro” actually appears below the subforums contained within.  I tried playing with the spforumview file and moving some stuff around but ended up breaking it so better to leave it to the experts 😉

thanks again guys.  (disregard the blue text in the pic, it was my notes but it’s kinda small to read!)

 

reverseforumview.jpg

3 Answers

New Answer

MP Mr Papa
Mr Papa
Member

so if I understand… you just want to list the topics in the forum first… then underneath, the subforums?

If so, look at the template… you will see two distinct sections…  just change the order… that is.. move:

            if (sp_has_subforums()) :

that whole ‘if’ code section to be under the section that starts with:

            sp_SectionStart(‘tagClass=spForumViewSection’, ‘forumHeader’);

voila…

CP Christian Pagan
Christian Pagan
Member

Mr Papa said
so if I understand… you just want to list the topics in the forum first… then underneath, the subforums?

If so, look at the template… you will see two distinct sections…  just change the order… that is.. move:

            if (sp_has_subforums()) :

that whole ‘if’ code section to be under the section that starts with:

            sp_SectionStart(‘tagClass=spForumViewSection’, ‘forumHeader’);

voila…

I am a little lost on this, I have been trying to do this with no results I keep getting errors. Please let me know what file to edit and where exactly yo put this if command, because I cannot get it to work.

www.tncnewscentral.com/forum

YS Yellow Swordfish
Yellow Swordfish
Member

Steve didn’t say you had to enter the if statement – he said you needed to move that block of code.

It’s the spForumView.php theme template of your selected SP theme – as you identified above.

The sub-forum section starts with that ‘if’ statement – or the comment before it: “# Are there sub forums to display”. It ends with the comment line ‘# End of subforum section’.

Just move that whole block down to where you want it – which is probably immediately above the ‘editor’ section of code which you can also identify by the comment that starts it.

As always we recommend that you create your own SP theme so that any customisation is not lost during a future update. (http://codex.simple-press.com/codex/themes/theme-basics/creating-a-theme/)