Difference between revisions of "Functions:pageZoneGet"

From Whirlwind eCommerce Wiki
Jump to: navigation, search
(New page: == Description == pageZoneGet($zoneIdOrName,$pageId[,$dBug=false]); Retrieves a banner zone for display within a page template. == Syntax == $string = pageZoneGet($zoneIdOrName,$pageId); ...)
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{Page Template Functions Shortcuts}}
 
== Description ==
 
== Description ==
pageZoneGet($zoneIdOrName,$pageId[,$dBug=false]);
+
eV::pageZoneGet($zoneIdOrName,$pageId[,$dBug=false]);
 
Retrieves a banner zone for display within a page template.
 
Retrieves a banner zone for display within a page template.
  
 
== Syntax ==
 
== Syntax ==
$string = pageZoneGet($zoneIdOrName,$pageId);
+
$string = eV::pageZoneGet($zoneIdOrName,$pageId);
  
 
== Paramaters ==
 
== Paramaters ==
Line 18: Line 19:
  
 
== Examples ==
 
== Examples ==
;Call the function inline. This example uses the zoneId
+
 
 +
;Call the function inline.  
 +
This example uses the zoneId
 
<source lang="php">
 
<source lang="php">
  
Line 29: Line 32:
 
</source>
 
</source>
  
;Call the function and store to output later: This example uses the Zone Name
+
 
 +
;Call the function and store to output later
 +
This example uses the Zone Name
 
<source lang="php">
 
<source lang="php">
  

Latest revision as of 14:12, 21 October 2008

Page Template Managers

Page Template Functions

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";