Jump to content

put the value of a variable of a module in class body.


Grafyx89
 Share

Recommended Posts

Hello,

I have a module under presta 1.7 which displays results by clicking on the desired department and generates an url of this type for the display: "/ my-site / mon-module?Flag=1&alp=85&zip=1"

I would like to put a smarty condition in the generated page to display text for the value "85" or add this value in class body to then use the condition "{if $ page.page_name = ..}"

I have tried {if $ alp = 85} or {if $ value = 85}
But I don't have a desired result.

Thanks for your help

Share this post


Link to post
Share on other sites

No space between $ and variable name replace '$ alp' with '$alp'; also do not use '=' which is an assignment operator but use '==' or '===' if both valueas are of the same type e.g.
 

{if $alp == 85}
  ..code here
{/if}

The 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More