Functions:pageZoneGet
From Whirlwind eCommerce Wiki
Description
eV::pageZoneGet($zoneIdOrName,$pageId[,$dBug=false]); Retrieves a banner zone for display within a page template.
Syntax
$string = eV::pageZoneGet($zoneIdOrName,$pageId);
Paramaters
- $zoneIdOrName (int|string)
- The zone Id (as generated in banner management when creating the zone) or the exact name of the zone (cap sensitive). If both a zone with a matching id and a zone with a matching name (name is an integer) qualify, the matching id zone will be returned.
- $pageId (int)
- The page Id used to qualify banners in the zone. As banners can be set to be explicitly included within or excluded from certain pages, this qualification is made by the pageId passed. Usually the pageId will be the core variable $pageId which is automatically available in page template management.
- $dBug (bool) optional
- If set to TRUE, debugging information including query results will be returned in the function return string.
Return Values
Returns a string containing all the necessary code to present a banner. Place the resulting string where you wish the banner zone to appear in the template.
Examples
- Call the function inline.
This example uses the zoneId
echo "<table><tr><td>"; echo "Please visit our sponsor below"; echo "</td></tr><tr><td>"; echo eV:pageZoneGet(12,$pageId); echo "</td></tr></table>";
- Call the function and store to output later
This example uses the Zone Name
// get banner zone $zoneString = eV:pageZoneGet("Home.center.1",$pageId); // somewhere later in the code echo "Please visit our sponsor: $zoneString";