Forums / Developer / url parameters

url parameters

Author Message

Fabricio Guerrero

Thursday 31 March 2005 12:41:18 am

are url parameters managable via ezPublish scripting with out having to go to PHP scripting?

example: http://site.com/index.php/about?myparameter=value&param2=value2

can i grab and use the myparameter value from the url?

http://www.solobromasychistes.com <<Joomla Site :P
http://www.recipesforhealthyfood.com/ <<Drupal Site :P
http://www.ezforge.com/ <<future ezCommunity, Articles, forums and more...

Łukasz Serwatka

Thursday 31 March 2005 12:50:12 am

Hi Fabricio,

You can use $view_parameters

http://site.com/index.php/about/(lang)/english

{$view_parameters.lang} <-- display english from tpl

or in your example

http://site.com/index.php/about?myparameter=value&param2=value2

{ezhttp('parametr', 'get')}

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Eivind Marienborg

Thursday 31 March 2005 12:50:49 am

Use view parameters.

http://site.com/index.php/about/(myparameter)/value/(param2)/value2/

You can then grab these parameters in your view templates using

{view_parameters.myparameter}
{view_parameters.param2}

will output

value
value2

Eivind

Łukasz Serwatka

Thursday 31 March 2005 12:52:56 am

Eivind :-) At the same time ...

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Eirik Alfstad Johansen

Thursday 31 March 2005 12:54:34 am

Damn, I was going to answer this one too. :)

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Łukasz Serwatka

Thursday 31 March 2005 1:06:01 am

Eirik I will leave the next post for you ;)

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Eivind Marienborg

Thursday 31 March 2005 2:02:07 am

Hehe, finally a question everyone can answer ;P ;)

Fabricio Guerrero

Thursday 31 March 2005 6:36:49 am

thanks... nice 2 know this is a good community...

http://www.solobromasychistes.com <<Joomla Site :P
http://www.recipesforhealthyfood.com/ <<Drupal Site :P
http://www.ezforge.com/ <<future ezCommunity, Articles, forums and more...