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

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
Hadrien

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

Post 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 !
Last edited by Hadrien on Tue Oct 17, 2006 4:11 pm, edited 1 time in total.
Hadrien

Re: how to get content_id in a template ?

Post 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 !
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

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

Post by calguy1000 »

The returnid should be your contentid as well.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Locked

Return to “Modules/Add-Ons”