Filters ::: filter_tabs
Maintained by José Puente Fuentes
Moodle filter which creates tabs in textfields
Latest release:
532 sites
67 fans
Current versions available: 11

This is a simple Moodle filter which creates tabs in textfields.

First, activate the filter_tabs plugin in Site Administration -> Plugins -> Filters -> Manage filters

To create tabs in textfields where the filter is activated, simply use the following syntax:

{%:Tab title}Tab text{%}


The following placeholders in a textfield:

{%:First tab}Some text{%}
{%:Second tab}Another text{%}

will produce this tab group:

| First tab | Second tab |
| Some text                      |
|                                         |

Bootstrap 4, Bootstrap 2 and YUI theme styles are supported.


Screenshot #0
Screenshot #1


José Puente Fuentes (Lead maintainer): Developer
Alexander Bias: Original maintainer
Stefan Lehneis: Initial Developer
Ulm University: Original maintainer
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • José Puente Fuentes
    Fri, Jul 13, 2018, 5:55 AM
    Hi Ricardo,
    Have you tried to go to the plugin configuration and indicate the type of tab?
    In the configuration you can see a preview of the tabs.
    By default, the tabs compatible with themes based on Bootstrap 2 are activated, but it is possible to select tabs compatible with themes that use Bootstrap 4 or even old ones that use YUI.
    I have tested the tabs with the Boots theme selecting compatibility with Bootstrap 4 and it works,
    I hope this helps.
  • Ricardo Caiado
    Fri, Jul 13, 2018, 9:39 PM
    Hi José,

    You were right!

    Wrong Bootstrap version.


  • Rex Lorenzo
    Thu, May 23, 2019, 1:26 AM
    We had a feature request from a department that heavily uses this filter. They wanted to be able to have a URL to force a certain tab to view. Also, ideally, when the tabs are clicked on they want the url in the browser to change so they can bookmark it or share it.
    I think the first one can be possible with GET parameters. But the second would require JS?
  • José Puente Fuentes
    Wed, Aug 21, 2019, 8:07 AM
    Hi Rex,
    yes, I think so. Due to bootstrap tabs implementation, we would need javascript for that feature.

    Anyway, I think it's a very interesting option, I think I will include it in the next version!
    If you tell me the version you are using and the requirements, I will try to adapt it as much as possible to your needs


  • Joseph Liaw
    Thu, Jul 16, 2020, 8:57 AM
    Hi Jose: Any plans to update this plugin to 3.8 since 3.8 is Long Term Support? Thank you for sharing this great plugin to help teachers organize their content in a tabbed format for their students!
  • Ricardo Caiado
    Tue, Aug 18, 2020, 4:30 AM
    Is it compatible with 3.9+ version of Moodle?
  • Ram Freedman
    Thu, Sep 24, 2020, 1:04 PM
    Is there a way to add to each tab an activity or resource?
    I want to add text to each tab and also some activity or resource that is relevant to this tab only.
  • Dave Foord
    Tue, Jun 28, 2022, 9:01 PM
    I have updated this plugin on a few sites that I support (one is Moodle 3.9 the other is Moodle 3.11), and the new version of the plugin is not rendering correctly, in that the contents of the tab are being shown as html code, rather than rendered correctly. I notice that for some reason it is adding a at the start of each tab and a

    at the end, which I assume is causing this rendering problem, but I don't know why it has added these tags as it has.

  • José Puente Fuentes
    Thu, Jul 7, 2022, 3:33 AM
    Hi Dave,
    I just retested it on version 3.11 and it works fine. Maybe it's something wrong with the text being passed to it or the theme you're using?
  • Dave Foord
    Fri, Jul 8, 2022, 12:15 AM
    Thanks for testing for me. I use the Moove theme, I have tried changing to Classic and Foundation, and same in all 3 themes, so I wonder what is causing this problem - I assume there must be something else on the site that is clashing. Not to worry, the older version of the plugin works OK, so I just need to remember not to update it.
  • José Puente Fuentes
    Fri, Jul 8, 2022, 3:26 AM
    Hi Dave!
    I am intrigued!, could you pass me the text that you are trying to render and the type of content in which you do it?
  • Dave Foord
    Mon, Jul 25, 2022, 2:32 PM
    Jose - sorry for the delayed response to this (I was on holiday), I generally use this within the book activity. here is a sample of the text that I have used:

    This only works if the tabbed display plugin is installed on the site

    Again should add the headings at top of each tab for accessibility purposes

    {%:Tab 1}

    Tab 1 heading
    Skeletal age (SA) is an indicator of biological maturation, the level of maturity of the bones of the hand and wrist (M Malina, Rogol, Cumming, Coelho-e-Silva, & Figueiredo, 2015). It is the most useful estimate of maturity status and can be used from childhood into late adolescence. It can also be used with current body height and mid-parent height to predict mature height, which is of interest in some sports (Bergeron et al., 2015).

    Unfortunately, SA assessment and the single best maturational index is costly, requires specialized equipment and interpretation, and incurs radiation safety issues (Mirwald, Baxter-Jones, Bailey, & P Beunen, 2002) being the main reason why is not recommended by ITU.

    {%}{%:Tab 2}

    Tab 2 heading
    Anthropometric variables include age (years), body mass (kg), stretch stature (cm), sitting height (cm), and the sum of 6 skin-folds (mm) (triceps, subscapular, supraspinale, abdominal, front thigh and medial calf), and has to be measured following the guidelines described by the International Society for the Advancement of Kinanthropometry (ISAK).

    {%}{%:Tab 3}

    Tab 3 heading
    Monitoring peak weight velocity is an easy and active intervention that should be conducted approximately every six months. Coaches need to ensure that this phase is not missed and can be easily done by registering the athlete's mass on the Peak Weight Velocity tracking file.

    Great care needs to be taken when measuring weight of athletes, as this can be a trigger to an unhealthy focus on weight and has in the past led to eating disorders and similar conditions in athletes. Therefore measuring athlete's weight should only be done with care.

    {%}{%:Tab 4}

    Tab 4 heading
    The Age of Peak Height velocity (APHV) can be calculated using the maturity offset value through a simple and non-invasive method. The results are obtained through the Mirwald equation, helping coaches to predict what age the athlete will achieve PHV, and therefore, identify the child's stage of development. This method of calculating the maturity offset can be completed by measuring the anthropometric ratio of the body and the following info:

    Date of Birth
    Date of Measurement
    Standing Height (cm)
    Sitting Height (cm)
    Weight (kg)
  • José Puente Fuentes
    Fri, Jul 29, 2022, 7:10 AM
    Hi Dave!,

    I have tried to reproduce the error with the same options that you indicate, but I have not been able to. I think it may be due to some content prior to the tabs not closing those a-type tags correctly, but I don't know for sure.

    Regarding accessibility, in the next version I will add the aria-controls property to the tabs, but I don't know if that will fix the issue so that you don't have to add another header. I have tried with a screen reader and it seems to work. Could you add more things in terms of accessibility?

    Thank you very much!
  • Xavier Molina-Schenk
    Mon, Aug 29, 2022, 11:37 PM
    Hi Jose
    In Boost (moodle 4) it is no longer possible to format text or insert tables. Or is it just me?
  • José Puente Fuentes
    Wed, Sep 7, 2022, 5:57 AM
    Hi Xavier!

    Thanks for the feedback. This was a bug in the latest plugin update. I have uploaded a new version that corrects the bug and now it correctly displays html text.

    I await your comment on whether it is already shown correctly.

    Thank you very much!
1 2 3 4
Please login to post comments