Forums | Mahara Community

Developers /
Issue with side block development

Kristina Hoeppner's profile picture
Posts: 3446

03 March 2017, 12:59 PM

Reposted from an email:

I have a question about sideblocks. I want to create a sideblock which will be visible on every Mahara page. I found out that for doing that I can use 'local_sideblocks_update()' function. That works even if that function is defined in the lib.php file of a new artefact.
The only problem is that I get this:
[Dwoo_Exception]: Template "sideblocks/eblogin.tpl" could not be found in any of your include path(s)
Obviously the sideblock template file can't be found...
What is the path if I want to have a template file inside artefact's folder (e.g. htdocs/artefact/someartefact/) - I am specifically interested in sideblock templates.
Thank you for pointing me to the right direction.
Robert Lyon's profile picture
Posts: 377

03 March 2017, 1:37 PM

One thing you could try is to place the template file in the local template directory,



or it might be


You may need to create the directories first.

The way we pick a template in mahara allows us to override any existing template with one in local/ subdir

See for example

Where I use a local template and include it




Gregor Anželj's profile picture
Posts: 348

03 March 2017, 9:33 PM

Thank you for your answer Robert.

Actually the folder structure is: htdocs/local/theme/templates/sideblocks

I just wanted to know if there is any way to include this somewhere under new artefact's folder so that the whole code for the new artefact would be as self contained as possible (that everything would be in the same folder and/or subfolders).

3 results