Alternative To Web Page Resource - Multiple Web Pages

Alternative To Web Page Resource - Multiple Web Pages

by Matt Thomas -
Number of replies: 8
I am fairly new to Moodle, but I searched for a couple of hours in these forums to see if there was a way to have multiple sub-pages branching off a web page reousrce on the home page without having to show links to all the sub-pages in the main menu. So there may be a way to do it (other than creating an HTML block with copies of selected main menu links and then hiding the main menu), but I just decided to make my own module based on an existing module: book.

Basically, I modified book to create a new module. I changed it so it has its own tables in the database, looks like a plain web page (without the fancy controls), changed all "book" terminology to "pages", modified the sidebar navigation of pages so that it appears to be a block (with the same block css styles used on the home page), changed the css styles used for the content area to match that used for web page content areas, and threw in a few extra little things like adding a Home Page link in the "block-style" page menu and hiding the page name in the menu if there is only one page.

So this way, you can have one link in your main menu on your home page that goes to a multi-webpage resource that is intuitively navigable and very easy to add additional pages to.

If anyone has a need for such a thing, let me know and I will pass along the code to you.

Screenshot example attached.
Attachment multipagesample.jpg
Average of ratings: -
In reply to Matt Thomas

Re: Alternative To Web Page Resource - Multiple Web Pages

by Art Lader -

Dear Matt,

This looks very interesting. Nice and clean.

You know, there are thousands of Moodlers active on the site. Why not go ahead and release your code? I am sure it will be just what someone is looking for! smile

Best regards,
Art

In reply to Art Lader

Re: Alternative To Web Page Resource - Multiple Web Pages

by Matt Thomas -
Ok, I'll do that as soon as I figure out what I need to do as far as version numbers, appending pre-existing code comments to indicate its a derivative work, and any GPL requirements I am not yet aware of. I'm new to Moodle development. big grin
In reply to Matt Thomas

Re: Alternative To Web Page Resource - Multiple Web Pages

by Mon B -

Hi,

Just yesterday I was trying to come up with a way of supplying web page resources in the easiest way possible - your module sounds perfect for my needs. Look forward to seeing it officially available (I have no programming skills so couldn't do anything with it before that).

thanks smile

In reply to Mon B

Re: Alternative To Web Page Resource - Multiple Web Pages

by Matt Thomas -
Ok my idea was good while I could find no other pre-existing module to use. But for giggles I was looking at the modules database on moodle.org today, and sorted it by date entered to see what was new. Guess what was on top??? CMS Plugin. I haven't tried it yet, but it looks almost exactly what I wanted in the first place. smile

In reply to Matt Thomas

Re: Alternative To Web Page Resource - Multiple Web Pages

by N Hansen -
There's something else I noticed today too that might work, although it seems to have a bug at the moment and isn't operational. You can put the course blocks on a resource page, so if you had all your pages listed in the main menu block, and then displayed the site blocks on the resource page, it might have the same effect.
In reply to Matt Thomas

Re: Alternative To Web Page Resource - Multiple Web Pages

by N Hansen -
Matt-I visited your site to see this in action. As far as I can see, this is basically the same as book, except it is lacking the navigation and print icons, and has added the home page link, and table of contents has been replaced with the page name. I don't understand what you mean by hiding the page name if there is only one link. Why use it if there is only one link? Also, it would be nice if you added the subpages to the breadcrumb trail. Look forward to seeing the code for this.

PS-Is this running on 1.5 or 1.6? I don't know if you are aware, but there have been changes to the book module for 1.6.
In reply to N Hansen

Re: Alternative To Web Page Resource - Multiple Web Pages

by Matt Thomas -
I am only able to run 1.5 with my hosting provider at this time. That is why I made the original post - there are likely many other folks out there that will not be able to use any new features in 1.6 for a while because of limitations with their hosting provider (MySQL version) and I want to help out those of us who are stuck in the 1.5 world.
In reply to Matt Thomas

Re: Alternative To Web Page Resource - Multiple Web Pages

by Matt Thomas -
You know...I was looking at the CMS plugin and realized that its installation is not very streamlined. So here is my modification of the Book module. I renamed everything to "Multipage". So it gets database tables and an entry in the Activities list separate from Book - if you are using both, they will act like completely separate modules.   Installation is just like Book - very easy.