Hi there,
I got a basic question: How can I create my own hooks in templates and php files ?
And another question: How can I use them?
I wanted to add something to my home page in the cms.
Basically I wanted to add a slider function to it, or lets say, firstly just the template.
So what I did was as follows:
1. Add own template in default style:
called 'content_slider' and put my html code in
2. added product:
Add-On: CMS
Hook: init_start
Title: content_slider
Priority: 5
Code
PHP Code:
$template_hook['cms_content_slider'] .= vB_Template::create('content_slider')->render();
active: Yes
3. I edited the template:vbcms_page
and put this code inside:
Code:
{vb:raw template_hook.cms_content_slider}
The result was:
Everything is vice versa and my page looks very arabic... no offense .... but it actually changed to RTL!!!! I was really confused.
Maybe somebody could help me out how to add template hooks and php hooks