Page 1 of 1

[SOLVED] how to get content_id in a module action ?

Posted: Tue Oct 17, 2006 3:55 pm
by Hadrien
Hi there !
I want to use a module in a template but i need to pass via a parameter the id of the current content :

Code: Select all

{cms_module module='modulename'  action='the_action'  content_id='i_do_not_know'}
How do i do that ?

Thanx for your answers !

Re: how to get content_id in a template ?

Posted: Tue Oct 17, 2006 4:11 pm
by Hadrien
I found my answer :

In my module code, i can retrive the content id via :

Code: Select all

$gCms->variables['pageinfo']->content_id;
so i do not need to pass content_id via any parameter in my template :-)
So : my problem is SOLVED !

Re: [SOLVED] how to get content_id in a module action ?

Posted: Tue Oct 17, 2006 4:22 pm
by calguy1000
The returnid should be your contentid as well.