Your Moodle version

General plugins (Local): Static Pages

Maintained by Picture of University of Ulm University of Ulm, Picture of Alexander Bias Alexander Bias
Moodle plugin which displays information pages which exist outside any course, imprint or faq pages for example, complete with Moodle navigation and theme

The local_staticpage plugin is designed to fetch a static HTML document from disk, enrich it with Moodle navigation and theme and deliver it as a standard Moodle page which exists outside any course.

Static pages will be available on catchy URLs like and can be linked from Moodle HTML blocks, from your Moodle theme footer and so on. Using the local_staticpages plugin, you can create information pages within moodle, but without misusing a whole course just for showing a textbox.

See README file for details.


Screenshot #0


Picture of University of Ulm
University of Ulm (Lead maintainer)
Picture of Alexander Bias
Alexander Bias: Developer
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of William Workman
    Thu, Jun 9, 2016, 3:10 AM
    Just realized I could offer what I think is the problem. When you add a block to static pages, it by default adds it as system(shows "Orignial Block Location" as System) This is nonconfigurable after the block is added. Thx
  • Picture of Alexander Bias
    Thu, Jun 9, 2016, 6:32 PM
    Hi William,

    if you look at the README of the plugin (, you will see that there is basic support for blocks, but that the plugin was not intended to show blocks on the static pages.

    I don't understand what your latest status is - did you achieve your goal or not?

  • Picture of Abel Carreto
    Tue, Jun 21, 2016, 2:05 AM
    One brief question.

    I've tried to use HTML anchors like in this page:

    I've used the HTML5 way to do it, but it doesn't work in Static Pages.

    Is html blocked on this plugin or something like that? Sorry for my inexperience.

    Best regards.
  • Picture of Alexander Bias
    Tue, Jun 21, 2016, 9:29 PM
    Hi Abel,

    basically, you should be able to define an anchor with something like
    h3 id="foo" (I removed the brackets from the tags for styling reasons here on
    and link to it with
    a href="#foo"

    But this does not work if you have the plugin's setting local_staticpage | cleanhtml = On. Then a HTML cleaning function is used which drops the ID attribute. If you switch this off, you should be fine.

  • Picture of Abel Carreto
    Tue, Jun 21, 2016, 10:17 PM
    Aha, I understand. Thanks for your fast answer.
    How can I switch the HTML cleaning function off?
    Thanks again.
  • Picture of Alexander Bias
    Wed, Jun 22, 2016, 3:13 AM
    Hi Abel,

    please go to /admin/settings.php?section=staticpage and change the setting there.
    Please also note that the setting is only there in the 3.0 version of the plugin.

  • Picture of Usman Asar
    Wed, Jul 27, 2016, 8:15 AM
    Alex, I have just used version 3.x and found few things have changed, besides file up loader rather than giving a path (both have their advantages) one thing I really missed is where in previous versions it use to list all the found files and give paths to be used making it easy for users to copy/paste paths, whilst this is not he case now,if not automated path, can you type in static text in plug-in settings how may a URL would look like.
  • Picture of MTECH M
    Thu, Jul 28, 2016, 10:31 AM
    I have installed the plugin and added an htaccess file to my moodle installation folder with the specified changes. I upload a plain html file using the example code provided in the readme. I am getting a 404 error no matter what I try. Any suggestions? Thanks
  • Picture of Alexander Bias
    Mon, Aug 1, 2016, 5:16 AM
    Hi Usman,

    thanks for your feedback.
    I have removed the list of the found files in the course of changing the place where the HTML files are saved from a directory on disk to a filearea in Moodle itself. I just wanted to get rid of problematic stuff and storing the files in a directory as well as the list of files produced most support requests in the last years.
    But you're right, there should be a note at which URL the static files can be found and I will add this to the next minor release.

    Hi MTECH,

    I am sorry, but I can't help you with that few information about your problem. If you submit detailed information about your setup, I will do my best to help you.

  • Picture of marc mathys
    Wed, Aug 24, 2016, 12:17 AM
    Wonderful plugin. Thanks. Is there a way to hide the URL and just go directly to the link?
  • Picture of Alexander Bias
    Wed, Aug 24, 2016, 4:59 PM
    Hi Marc,

    I am really sorry but I don't understand your question. Could you please elaborate on what you want to achieve?

  • Picture of Georg Wiesinger
    Wed, Aug 31, 2016, 6:58 PM
    Hi! I would like to use a static page to show a calendar ( I tried it first using an iframe but I wasn't very happy with the resizing of the calendar. Using the fullcalendar script directly in a static page results in a blank page when opening it in Moodle which I guess is due to the js libraries not being loading properly. My questions: Is there a way to show this calendar within a static page at all? Where would I have to place the links to the libraries to not interfere with the ones loaded by Moodle? I used Moodle's additional html section to save all css and js links but it didn't work! I really appreciate any help!
  • Picture of Georg Wiesinger
    Mon, Sep 5, 2016, 5:30 PM
    Hi! May I ask how to show blocks on specific static pages instead on all of them! I can choose between 5 entries in the block configuration (local-staticpage-view, local-staticpage-view-*, local-staticpage-*, local-* and every page) but nothing is changing at all! Am I missing something? Thanks a lot in advance!
  • Picture of Anusha Reddy
    Sat, Sep 10, 2016, 8:39 PM
    I created an html page on word. While my static page opens up, however, the images in the page do not load. Any idea how I can resolve this? Thank you.
  • Picture of Alexander Bias
    Wed, Sep 14, 2016, 4:56 PM
    Hi Anusha,

    If you look at, you will read:
    "If you want to include images into your static page, you have to upload them somewhere else. local_staticpage is not capable of hosting / serving image files. Linking to image files, please do yourself a favour and link to them with absolute URLs, not relative URLs."
    I think this should answer your question.

    Hi Georg,

    sorry for the late answer.

    Regarding the calendar:
    On the one hand, I can't give you really good help how to add this JS calendar to a static page. I can only tell you to make sure that the static page plugin is configured to not clean the static page content because otherwise the JS code you add to a static page might be dropped. Everything else exceeds my time to support this plugin, sorry.
    On the other hand, you can't add any PHP code to display the Moodle-internal calendar to a static page, sorry.

    Regarding the block placement:
    I am not aware which version of the plugin you are using. With the latest version of the plugin (which is the only one we support), it is possible to add a block to a static page and to configure in the block configuration to show the block on static-.html (which means only this page) or static-* (which means all static pages).

    Thanks anyway,
1 2 3 4 5 6 7 8 9 10
Please login to post comments