Topic Closed
brvanton
5 Posts
How to register or call the gadget template
6 years ago#7138

brvanton
5 Posts

Example this gallery?

https://www.gpeasy.com/Plugins/232_Bootstrap_Carousel_Gallery

6 years ago#7139

fly06
263 Posts
18.2K Downloads
1 Themes
8 Plugins

You should be able to call a gadget in content by using the Execute_PHP plugin:

https://gpeasy.com/Plugins/98_Execute_PHP

Please follow these steps:

  1. Install the Execute_PHP plugin
  2. Create a new page and set its content type to ' Execute_PHP'
  3. Edit this new page and enter the code gpOutput::GetGadget('Gadget_Name'); to call your gadget

Hope this helps.

6 years ago#7145

mishal
5 Posts

I wouldn't use the Execute_PHP plugin in this way. Including a gadget in page content is a built in feature of gpEasy.

  1. Create a page
  2. Add a new section to the page and make sure the content type is "File Include".
  3. Click edit for the new section and select the gadget.
  4. Save, and you're done
6 years ago#7147

brvanton
5 Posts

Thank you very much!

I have one more question, how to connect js to my site?

6 years ago#7148

BaBo
2 Posts
4.2K Downloads
1 Themes

What do you mean by 'connect'?

You can include JavaScript files in the <head> section of your template.
Or you can write js in the source code of an editable area.
Including js in a new section (type "File Include") as mishal described it for PHP (#7147), should work as well (I haven't tried yet).

6 years ago#7149

fly06
263 Posts
18.2K Downloads
1 Themes
8 Plugins

To include a js file in the <head> section of your template using the Execute_PHP plugin:

global $page;

$page->head_js[] = '/my/file/path/file.js';

gpOutput::GetGadget('Gadget_Name'); 

And you're done.

 

 

6 years ago#7157

brvanton
5 Posts
What to write in "Gadget_Name"?
6 years ago#7159

fly06
263 Posts
18.2K Downloads
1 Themes
8 Plugins

What to write in "Gadget_Name"?

Gadgets are listed on a per plugin basis in the administration (Manage Plugins).

However the exact name to use in the GetGadget() method may differ from the displayed name.

For instance underscores (in the exact name) are replaced by blank spaces (in the displayed name).

 

 

6 years ago#7164

Topic Closed

 

News

Typesetter 5.1
8/12/2017

Typesetter 5.0.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

Over 8 Times Faster Than Wordpress
5/3/2016

We've known for a long time that Typesetter is fast. It's something we take pride ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Luzern (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Website * ...

Find out more about our Provider Spotlight

Log In

  Register