Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default how to ez pages id for use in php code

    I need to be able to assign a specific css class on each ez page. So I need to pull the id number to use in my if statement. I see that the $current_page_base is page so is there something already usable in zen to pull the id number off the string?

    The code will go something like this:

    if ($current_page_base=='page') {
    what is the id number?
    }
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  2. #2
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: how to ez pages id for use in php code

    really bright!

    The answer is

    $pageid = $_GET['id'];

    if ($pageid ==1) $class='sky';
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

 

 

Similar Threads

  1. Can I put PHP <code> in EZ-pages?
    By ryska in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 22 May 2010, 07:31 PM
  2. Php code insede ez pages of Zen Cart 1.3.8
    By never11 in forum General Questions
    Replies: 2
    Last Post: 28 Mar 2010, 09:30 PM
  3. PHP code in define pages
    By ukgreg in forum General Questions
    Replies: 1
    Last Post: 6 Mar 2009, 03:11 AM
  4. How to add new pages with php code
    By andy1234 in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 11 Oct 2006, 10:32 AM

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