#1 2013-12-27 19:48:48

elegos
Member
Registered: 2013-12-23
Posts: 38

Include the template in a module

Hello!

I've noticed that <ion> tags are not enabled in the modules' views. Is there any way I can include a template file including all the <ion> tags? So that my module's view looks like:

<ion:partial view="current_template/special_view" />

And special_view.php can use all <ion> tags plus the ones I've defined in the module.

Thanks.

Last edited by elegos (2013-12-27 19:49:26)

Offline

#2 2014-07-18 21:01:57

miqueiasdesouza
Member
Registered: 2014-07-18
Posts: 3

Re: Include the template in a module

I am also need this

Offline

#3 2014-07-19 23:31:50

CodeStepper
Member
From: Poland
Registered: 2014-06-30
Posts: 53
Website

Re: Include the template in a module

Yes, you can!

All you have to do, to turn on tags, is add this lines to your module controller file in for example index function:

include APPPATH . 'libraries/Tagmanager.php';
Tagmanager::render( 'index' );

So... use Tagmanager::render( 'view' ) instead of using $this->load->view( 'view' ).

Full example:

public function index( )
	{
		include APPPATH . 'libraries/Tagmanager.php';
		Tagmanager::render( 'index' );
	}

--- EDIT ------
Here's better solution:
http://ionizecms.com/forum/viewtopic.php?pid=7553#p7553

Redgards.

Last edited by CodeStepper (2014-07-20 00:48:12)

Offline

What's Ionize ?

Ionize is an Open Source Content Management System created by webdesigners for webdesigners.

Created and maintained by Partikule and Toopixel, Ionize wants to be the easiest and most powerful CMS.

Can I help ?

Because talent is nothing without involvement, we are looking for motivated coders and webdesigners to join the project team.

Resources

Website : ionizecms.com
Documentation : doc.ionizecms.com

Development : Ionize on GitHub
Translations : Ionize Translations