Forums / Developer / Problem retrieving module parameters from template

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Problem retrieving module parameters from template

Author Message

Michael Scofield

Sunday 27 July 2008 8:39:44 pm

Hi.

I have a template file where I'm trying to read a parameter sent by the URL, but I can't.

For example, if I open:

http://mydomain.com/eng/content/view/full/172/var1/value1/var2/value2
It's using "content" module and "view" view.
Ordered parameter is only one: "full", and it's value is 172.
Unordered parameters are "var1" and "var2".

I've been unsuccessfully trying to read the unordered parameters from a template file doing the following code, but I couldn't:

{def $mp = module_params()}
{$mp.parameters.var1}

Why my two unordered parameters are not being listed inside $mp.parameters?

Thanks
Michael Scofield

Piotrek Karaś

Monday 28 July 2008 1:27:21 pm

The documentation says about module_params() operator:

It seems that it can only be called inside "pagelayout.tpl".

Have you seen that?

Have you tried:

http://mydomain.com/eng/content/view/full/172/(var1)/value1/(var2)/value2

?

Why not simply use $module_result.view_parameters?

Greets,
Piotrek

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu