Your Moodle version

General plugins (Local): Static Pages

local_staticpage
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
1k
855
39

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 http://www.yourmoodle.com/static/faq.html 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.

Screenshots

Screenshot #0

Contributors

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 Phuong Hoang
    Tue, Mar 29, 2016, 4:17 PM
    Hi Alex,
    I miss nothing. I'm only afraid that someone would like to install your plugin, they can't imagine how it works, especially uploading documents.
  • Picture of Tom Simon
    Tue, Mar 29, 2016, 7:42 PM
    With due respects, I relate to Phuong's comment. I ended up doing a manual install - but frankly gave up as things still did not seem to work. I really like the idea of static pages and think it is an excellent plug in for Moodle - hoping in future to see better documentation.
  • Picture of Alexander Bias
    Tue, Mar 29, 2016, 9:17 PM
    Hi Tom, hi Phuong,

    thanks for your feedback. I appreciate every improvement to documentation, but as I already know the plugin, I need to know where you failed when you tried to bring it into production.

    As I said above, there is already an extensive Readme on https://github.com/moodleuulm/moodle-local_staticpage/blob/master/README.md. The content of the Readme is not available directly here in the plugin repo page because it changes from release to release, but it is linked with the "More documentation on this plugin" link.

    So, if you tell me where you failed or what you did not understand in the Readme, I can try to improve it.

    Thanks,
    Alex
  • Picture of Abel Carreto
    Tue, Mar 29, 2016, 10:34 PM
    Thank you! It worked for me. And if it helps somebody else, I'll explain what I did to change /static/ url to what I wanted. As you said, I changed all the mentions to /static/ on view.php, placed in /local/static/ to what I wanted. In my case, /paginas/. Then I only had to do the properly to the .htaccess, and change to :

    RewriteEngine On
    RewriteRule ^paginas/(.*)\.html$ /local/staticpage/view.php?page=$1&%{QUERY_STRING} [L]

    And voilà, everything fine (even breadcrumbs).

    Thanks for your help and for the plugin, Alexander,

    Best regards.
  • Picture of Daniel Tyas
    Mon, May 16, 2016, 4:48 PM
    Hello, firstly thank you for the plugin, its very useful, however I'm having one problem, I've uploaded the html pages using the browser uploader, but can't find them when I ftp into my server, could you advise where the folder is? Thanks
  • Picture of Alexander Bias
    Tue, May 17, 2016, 2:43 PM
    Hi Daniel,

    with the 3.0 version of this plugin, we are using a filearea in Moodle for storing the files instead of the previously used directory on disk. Thus, Moodle buries your files somewhere below the /filedir directory on disk like it does for all other files you are uploading in Moodle (e.g. in a course).

    Perhaps http://www.nathanfriend.co.uk/find-where-moodle-2-has-put-your-file/ can help you finding your file if you need to identify it on disk.

    Thanks,
    Alex
  • Picture of Israel Dutra
    Sun, May 22, 2016, 12:11 AM
    Hi guys,
    Simple question:

    How can we insert and run PHP codes into a page?
    It's very important and useful.

    Thank you so much,
    Israel.
  • Picture of Alexander Bias
    Sun, May 22, 2016, 3:45 AM
    Hi Israel,

    simple answer: No, local_staticpage does not process PHP code and we also won't add this feature because of strong security concerns. If you need to run PHP code in a single page, you should create your own plugin. It's easier as you may think.

    Thanks,
    Alex
  • Picture of William Workman
    Thu, Jun 9, 2016, 3:04 AM
    I have used this plugin for two or three pages. However, as far as telling specific blocks to only show on specific pages, it ignores such rules and adds any blocks that are added to any static page to every other static page. If you configure the block to not show on any of the static pages, it applies same argument/rule to all the other static pages. For you're info, these are the pages I'm referring:
    http://pmnerds.com/local/staticpage/view.php?page=gv
    http://pmnerds.com/local/staticpage/view.php?page=volunteer

    suggestions? I would rather have the dev help before I hack it to pieces to find a work around. Thanks in advance smile
  • 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 (https://github.com/moodleuulm/moodle-local_staticpage/blob/master/README.md), 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?

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

    I've tried to use HTML anchors like in this page:
    http://stackoverflow.com/questions/484719/html-anchors-with-name-or-id

    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 moodle.org)
    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.

    Thanks,
    Alex
  • 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.
    Regards.
  • 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.

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