News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

"unable to load the 'main' template" in custom actin page

Started by poda19, June 27, 2012, 10:48:54 AM

Previous topic - Next topic

poda19

hi
i created a custom action using integration hooks as described here:http://wiki.simplemachines.org/smf/Add_a_custom_action_using_integration_hook
i did everything step by step and added my integratin hook successfully (a blank page appeard).
but when i try to access my action using ?action=showhomework i get the "unable to load the 'main' template" error. i am using the default theme and tested my action on an untouched smf forum, everything is default, no mods installed. every other page is ok, only my custom action page shows the error.
i have attached the files.
can anyone help?
I think people are stupid enough to lie

poda19

ooooooooooooh, i'm sorry :-[, i checked the spelling many times before i posted this but i have mistyped Func to Fucn.
:o :o :o
I think people are stupid enough to lie

Arantor

When you get that error it means that the template engine is expecting to execute template_main() as the template but it doesn't exist.

If you want to use a different function name (it must begin with template_ though), change $context['sub_template'] to something other than 'main', the default.

Advertisement: