Adding 'editing' button to a new Page

Adding 'editing' button to a new Page

by Tanveer Sohal -
Number of replies: 2

Hey everyone I've created a new page using this:


To edit this page, I need to go on the home page and click edit and then go onto this custom page - is there a way to add a edit page button onto this page?

Average of ratings: -
In reply to Tanveer Sohal

Re: Adding 'editing' button to a new Page

by Michael Milette -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Tanveer,

Can you tell us how you intend to use this page? Based on your sample code, it is not going to display any content on your page so it is not clear to me what you want to be able to edit.

Do you want to be able to edit your PHP source code from within Moodle?

Have you considered just adding a Page resource to your home page? Sounds like it has all of the features you are looking for.

Whatever you are trying to do, should make this a plugin in order to have an edit feature. Which type of plugin you need will depend on how you intend to use it. On the home page, you can often add blocks and modules but this may vary depending on your theme.

In a Label or Page resource module, or in an HTML block, you can use plain text filters like FilterCodes or Generico tags to generate dynamic content.

Like I said, it really depends on what you are trying to do.

Best regards,

Michael Milette

In reply to Michael Milette

Re: Adding 'editing' button to a new Page

by Tanveer Sohal -
I customise these pages according to whatever the page is e.g myurl/productinfo.php this would have HTML blocks with custom html etc to showcase product info. I need the button so I can edit that page and have some admins edit it as well .