General developer forum

Custom theme layout

 
Picture of Jer Brand
Re: Custom theme layout
 

This is probably a silly suggestion, but: 

Could you find a layout that's extremely basic/empty and build up from there? If that didn't remove enough elements, it might be worth including a custom page layout, like $PAGE->set_pagelayout("my-plugin-layout"), even though it should ignore your invalid layout and default to base. You could then use the class for your plugin pages (pagelayout-my-plugin-layout) then remove elements you don't want with CSS.

It's not really answering the question (I don't see a way to register a one-off layout either), but do you think it might work in your situation?

 
Average of ratings: -
Gareth J Barnard
Re: Custom theme layout
Core developersParticularly helpful MoodlersPlugin developers

Pragmatically you can't define new layouts unless you're using a theme and even then that can cause issues.  What is wrong with the existing layouts that have no block areas and fill the page where the plugin can orchestrate the content area as it wishes?

 
Average of ratings: -