#1
Looking at the docs, we can call modules from view files which I fully understand. However, if we have downloaded a Theme, can we create a module and then call it from the Theme folders?

For example, lets say I have downloaded the Powerhouse Theme, but want to add another section into the page that covers events. I would want to create an events module and then call this within powerhouse.php

How would we do this?

Thanks
#2
Hello,
Here is what I think you are asking.
https://trongate.io/docs_m/information/calling-another-module-from-a-view

Change it to call events module and then the method name
#3
Hi, thanks for this, but I already tried this.

modules::run('events/all_events')

but I got the error message

Warning: Constant THEME_DIR already defined in C:\xampp\htdocs\restaurant_v1\engine\bootstrap.php on line 25
#4
What is the name of your theme?
Are you calling the module from the view file or a controller file?

Another thought
this line in the templates folder
#5
I decided against using the Theme approach to build and have gone back to using Templates.

I was getting very confused about the way TG uses Themes and Templates, but the video from DC tonight on You-Tube has cleared things up in my mind.

Everything is working fine now.

Thanks for all of your help.

I am very lucky to have found this community, your help is always highly appreciated.
#6
Your welcome