Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2006
    Location
    Singapore
    Posts
    167
    Plugin Contributions
    1

    Default IF statement for EZ-Page

    Hi all...

    I would like to know what is the IF statement for a specific EZ-Page,

    example the page is at:

    /index.php?main_page=page&id=1&chapter=0

    I dont kow what variable control the page&id=1,

    if ($current_what_to_put_here ==1) {
    }

    The purpose is I would like make the header changed when visitor visit that page. So I want to insert that if statement on tpl_header.php

    Thanks!

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: IF statement for EZ-Page

    Try $ezpage_id
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Aug 2006
    Location
    Singapore
    Posts
    167
    Plugin Contributions
    1

    Default Re: IF statement for EZ-Page

    Quote Originally Posted by kuroi View Post
    Try $ezpage_id
    Hey Kuroi it is working. You always been very helpful.

    Now the header changed when I visit that specific EZ_Page, but... but only when there is no 'zenid', if zenid exist then no changes happen...

    When I set IF statement as below:

    if $ezpage_id=1

    Few possibilities below will happen:

    If in the URL $ezpage_id exist and no zenid <--- changes happen
    If in the URL $ezpage_id exist and zenid exist <---- no changes

    So now we have to find variable control for zenid to add in if statement, I tried $zenid, $zen_id but none works.

    And I also not sure what the correct operator, sinze $ezpage_id can be a standalone or in other case depend with zenid

    maybe something like

    if ($ezpage_id=1 or $zenid>0) ?

    Please enlighten me... =)

    Thanks a lot

  4. #4
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: IF statement for EZ-Page

    The syntax that you have posted is incorrect, though from your original post I suspect that you may already know this. Correct would be
    if ($ezpages_id == 1) {
    <statements>
    }
    I've tested this, including when there is a zenid in the URL and it works fine. If with correct syntax it's not working for you, and/or you are seeing zenid in the URL a lot then I suspect you have a rather different problem.

    zenid should only appear on the first click on a site, or when you click on a secure page (which your EZ-Pages would not normally be). If you are experiencing something different, I would recommend taking a look at this thread.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  5. #5
    Join Date
    Aug 2006
    Location
    Singapore
    Posts
    167
    Plugin Contributions
    1

    Default Re: IF statement for EZ-Page

    Quote Originally Posted by kuroi View Post
    The syntax that you have posted is incorrect, though from your original post I suspect that you may already know this. Correct would be I've tested this, including when there is a zenid in the URL and it works fine. If with correct syntax it's not working for you, and/or you are seeing zenid in the URL a lot then I suspect you have a rather different problem.

    zenid should only appear on the first click on a site, or when you click on a secure page (which your EZ-Pages would not normally be). If you are experiencing something different, I would recommend taking a look at this thread.
    Thanks again for your good info.

    I put the syntax correctly;

    if ($ezpage_id == 1) {
    <my statement>
    }

    then it will not working if zenid exist in URL, but unfortunately the first click will be likely the ez-page that I tried to modify which is an important page, so visitor will likely click it the first time arrived at the store with zenid in the URL.

    Anyhow I guess I also have the problem of zenid always appear on the URL, so I will check your suggestion.

    Thanks for great help Kuroi!

  6. #6
    Join Date
    Aug 2006
    Location
    Singapore
    Posts
    167
    Plugin Contributions
    1

    Default Re: IF statement for EZ-Page

    Kuroi,

    I check my session configuration, it was good.
    Then I found that the cache directory path is incorrect, I fixed it and zenid now working fine, zenid only appear on the first click, but it still a problem for me if visitor click the modified ez-pages at the first click.

    Do you have further suggestion?

    Thanks

 

 

Similar Threads

  1. EZ Page IF Statement
    By marcopolo in forum General Questions
    Replies: 2
    Last Post: 30 Nov 2015, 02:31 AM
  2. Syntax for an IF statement
    By brushwoodnursery in forum General Questions
    Replies: 0
    Last Post: 8 Nov 2008, 09:39 PM
  3. IF statement for a specific product info page
    By milkyway in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 4 Jul 2007, 07:59 AM
  4. Replies: 2
    Last Post: 1 Jul 2007, 05:23 AM
  5. This is the main define statement for the page for english when no template defined f
    By ginginca in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 10 Nov 2006, 08:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg