( ! ) Warning: get_browser(): browscap ini directive not set in /var/www/vendorama/cart/includes/browser.inc on line 127
Call Stack
#TimeMemoryFunctionLocation
10.0010365200{main}( ).../index.php:0
20.0014365704include_once( '/var/www/vendorama/cart/includes/global.inc' ).../index.php:3
30.0023367984include_once( '/var/www/vendorama/cart/includes/browser.inc' ).../global.inc:82
40.0148381784get_browser ( ).../browser.inc:127
Docs: Page Variables on Vendo

Docs: Page Variables

Every page has built-in variables that you can use. They include:

$_PAGE['page'] (or $_PAGE['id'])
$_PAGE['title']
$_PAGE['subsection']
$_PAGE['category_id'] (category and product pages)
$_PAGE['category']
$_PAGE['subcategory']
$_PAGE['subsubcategory']
$_PAGE['custom_head']
$_PAGE['custom_text']
$_PAGE['description'] (sets meta description)
$_PAGE['keywords'] (sets meta keywords)
$_PAGE['product_id'] (product pages)

Here is an example of using the $_PAGE['custom_text'] variable to display text only on the cart page:

<?
if($_PAGE['page']=='order'){
      $_PAGE['custom_text'] = "<p>When you are ready to pay for your order click the <a href=\"/checkout/\">checkout</a> button.</p>";
}
?>

The $_PAGE['page'] variable can be idenntified by viewing any page and locating the id attribute of the body tage. Normally the id will mirror the page URL, so the body tag of the URL /shop/books/ will look like <body id="page-books" ... >

Similarly, the page variables for $_PAGE['subsection'] and $_PAGE['subsection'] are used in the body classes. So the books category would have the body class:

<body id="page-books" class="category-books" ... >

 

Revisions history (7)    ( hide | show )     Variables > Page Variables