ElkArte Community

Elk Development => Theme development => Topic started by: hitokiri on December 30, 2020, 03:27:48 pm

Title: Moving Sub Boards to Bottom of Page
Post by: hitokiri on December 30, 2020, 03:27:48 pm
How can I modify the default template so that on the index page of a board that has sub-boards, the list of sub-boards are displayed near the bottom of the page instead of near the top?
Title: Re: Moving Sub Boards to Bottom of Page
Post by: Spuds on December 31, 2020, 05:54:06 pm
You mean not listing the sub board with the parent board ????? 
Title: Re: Moving Sub Boards to Bottom of Page
Post by: Allan on December 31, 2020, 07:42:03 pm
I believe he means having the sub boards listed under the current topic, whereas now it's on the top. 
Title: Re: Moving Sub Boards to Bottom of Page
Post by: hitokiri on January 01, 2021, 04:03:01 am
Thanks you all for chipping in.

Let me try and clarify using this link to the Localization board of this forum. Please visit the link.

https://www.elkarte.net/community/index.php?board=14.0

This board "Localization" has two child boards: "Download Language pack" and "Transifex Translation" which you can see listed near the top of the page under the "Sub Boards" section.

Below this you have a list of posts for the root Localization board.

What I want is for that section "Sub Boards" to be shown after the list of posts on the page (after the last section that contains icons for Locked topic, pinned topic etc).

Not before/above it as it is right now.

I hope my question is clearer?
Title: Re: Moving Sub Boards to Bottom of Page
Post by: ahrasis on January 01, 2021, 05:52:10 am
That could be difficult since after threads could mean after few pages of threads, if they are a lot.
Title: Re: Moving Sub Boards to Bottom of Page
Post by: hitokiri on January 01, 2021, 07:15:14 am
Quote from: ahrasis – That could be difficult since after threads could mean after few pages of threads, if they are a lot.
What I really mean is after the threads on that very first page
Title: Re: Moving Sub Boards to Bottom of Page
Post by: ahrasis on January 01, 2021, 08:02:47 am
That what I said difficult.
Title: Re: Moving Sub Boards to Bottom of Page
Post by: hitokiri on January 01, 2021, 09:27:36 am
hmmm really?  i hope there is someone who will help out
Title: Re: Moving Sub Boards to Bottom of Page
Post by: ahrasis on January 01, 2021, 10:42:54 am
Yeah, really, so good luck!
Title: Re: Moving Sub Boards to Bottom of Page
Post by: Spuds on January 01, 2021, 11:54:52 am
You will need to edit MessageIndex.template.php

Change the name of function template_display_child_boards_above() to be function template_display_child_boards_below()

You may have to change that first line from <header class="category_header"> to <header class="category_header clear"> if when you do the above rename things may get crowded below.
Title: Re: Moving Sub Boards to Bottom of Page
Post by: ahrasis on January 01, 2021, 01:30:38 pm
I guess I was wrong. It seems that in the controller file, the child board was already set to be on the front page only, so @Spuds suggestion should theoratically work.
Title: Re: Moving Sub Boards to Bottom of Page
Post by: hitokiri on January 01, 2021, 04:02:06 pm
Quote from: Spuds – You will need to edit MessageIndex.template.php

Change the name of function template_display_child_boards_above() to be function template_display_child_boards_below()

You may have to change that first line from <header class="category_header"> to <header class="category_header clear"> if when you do the above rename things may get crowded below.

Worked perfectly. Thank you so so much for your help with my questions