Create a collapsable topic zero

Create a collapsable topic zero

by Josh D -
Number of replies: 7
Hi Everyone,


Im wondering if anyone has come across the dilemma, were they have to much information in topic zero, and they needed to add a toggle function to topic zero so it can collapse/expand.

I 'created' buttons (and i use the word created loosely, cause all i did was put pictures in topic zero and create hyperlinks to the other topics), but now i have to many icons in topic zero, and when someone clicks on another topic (example, topic 1), they have to scroll past topic zero to get to topic 1. 


Does anyone have any suggestions? or ideas on what i could do?

this is my example 


Thanks!

Average of ratings: -
In reply to Josh D

Re: Create a collapsable topic zero

by Hartmut Scherer -

Hi Josh,

Can you use the Generico filter by Justin Hunt? It includes an accordian template. 

With kind regards,

Hartmut

In reply to Josh D

Re: Create a collapsable topic zero

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

I know what you mean.  I use Topic 0 as a place to put items that I always want to show, but it would be interesting to allow it to be collapsable.  Here is how mine looks:


Attachment Topic0.jpg
In reply to Josh D

Re: Create a collapsable topic zero

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Just move everything out of topic zero into the first topic - then rename it to be pertinent (Course Information, e.g).

In reply to Emma Richardson

Re: Create a collapsable topic zero

by Just H -

That wouldn't really work for courses showing a topic per page and a requirement to have certain things always visible on each page such as in Rick's example...unfortunately neither does using an accordion or folder as you can't put activities in them (if you can I would love to know how).

Accordion should work for the OP given it's just a grid of images.

In reply to Just H

Re: Create a collapsable topic zero

by Josh D -
i guess the other solution that I've been contemplating is adding a toggle function just to topic zero which will allow someone to expand/collapse the topic.


But I wouldn't know where to begin with css code... I'm not that savvy. 


ill check out accordion and see if it works for me.


Thanks everyone!

In reply to Josh D

Re: Create a collapsable topic zero

by Hartmut Scherer -

Hi Josh,

HERE I found useful code for collapsible accordion. It works at our site. 

With kind regards,

Hartmut

------------------------

<div class="panel-group" id="accordion"> <!-- accordion 1 -->

   <div class="panel panel-primary">

   

        <div class="panel-heading"> <!-- panel-heading -->

            <h4 class="panel-title"> <!-- title 1 -->

            <a data-toggle="collapse" data-parent="#accordion" href="#accordionOne">

              Collapsible Accordion 1

            </a>

           </h4>

        </div>

<!-- panel body -->

        <div id="accordionOne" class="panel-collapse collapse in">

          <div class="panel-body">

           Lorem ipsum dolor sit amet, consectetur adipisicing elit,

            sed do eiusmod tempor incididunt ut labore et dolore magna

            aliqua. Ut enim ad minim veniam, quis nostrud exercitation

            ullamco laboris nisi ut aliquip ex ea commodo consequat

          </div>

        </div>

  </div>

  

   <div class="panel panel-success">  <!-- accordion 2 -->

 

          <div class="panel-heading"> 

          <h4 class="panel-title"> <!-- title 2 -->

            <a data-toggle="collapse" data-parent="#accordion" href="#accordionTwo">

              Collapsible Accordion 2

            </a>

          </h4>

          </div>

<!-- panel body -->

        <div id="accordionTwo" class="panel-collapse collapse">

          <div class="panel-body">

            Change does not roll in on the wheels of inevitability,

            but comes through continuous struggle.

            And so we must straighten our backs and work for

            our freedom. A man can't ride you unless your back is bent.

          </div>

        </div>

   </div>

   

    <div class="panel panel-warning">  <!-- accordion 3 -->

        <div class="panel-heading">

          <h4 class="panel-title"> <!-- title 3 -->

            <a data-toggle="collapse" data-parent="#accordion" href="#accordionThree">

              Collapsible Accordion 3

            </a>

          </h4>

        </div>

        <div id="accordionThree" class="panel-collapse collapse">

          <!-- panel body -->

          <div class="panel-body">

          You must take personal responsibility.

            You cannot change the circumstances,

            the seasons, or the wind, but you can change yourself.

            That is something you have charge of.

        </div>

     </div>

 

 </div>

In reply to Josh D

Re: Create a collapsable topic zero

by John Provasnik -
Picture of Particularly helpful Moodlers Picture of Testers

This is the exact reason I moved to the Grid format in one of my courses. Once you click on the icon to be taken to a topic, you don't see the grid of icons anymore, unless you navigate back to the main page. There still is a 0 topic, but you can keep it basically empty.


You can also consider keeping your 0 topic empty and putting your button icons (and content) into your Topic 1 (basically, move everything down by one topic) -- this way, when you click on the icon to be taken to that topic, you'll only need to scroll past an empty 0 topic - and you'll have no icons to scroll past since they're in topic 1. This is very easily achievable using the Mass Actions block.