Jump to content

Problem initContent() in my first module


Recommended Posts

Hi,it's my first post in this forum , i hope i will solve my problem.


So i'm trying to make my first module ,i added a front controller , but i'm not able to load my template correctly.


With  parent::initContent() i got 500 error , whitout it , i got only some parts of my website like this :



HAHAHA is my display.tpl .


This is my code :

class charmoduledisplayModuleFrontController extends ModuleFrontController
	public function initContent()
Edited by faceofjock (see edit history)
Link to comment
Share on other sites

  • 1 year later...
You put the display.tpl within the correct folder?

Place inside the front folder as follows


YOURMODULE / views / templates / front / display.tpl


Otherwise the controller will not pull the tpl and will return this error

Had this problem recently and managed to solve so, you may have already solved too, but if it happens to someone with need this information


An simple axample:



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...