Difference between revisions of "Page Templates:Functions"

From Whirlwind eCommerce Wiki
Jump to: navigation, search
(changed linked pages, rebuilt descriptions)
Line 3: Line 3:
 
;Quick Output of State/Country Options in a Form Select
 
;Quick Output of State/Country Options in a Form Select
 
*[[functions:addressStateOptions|addressStateOptions]] - returns string of option tags for states
 
*[[functions:addressStateOptions|addressStateOptions]] - returns string of option tags for states
*addressCountryOptions - returns string of option tags for countries
+
*[[functions:addressCountryOptions|addressCountryOptions]] - returns string of option tags for countries
  
 
;Set Variables that Content Managers can use in the WYSIWYG copy editor
 
;Set Variables that Content Managers can use in the WYSIWYG copy editor
*eV::pageContentAttribsSet($array)
+
*[[functions:pageContentAttribsSet|pageContentAttribsSet]] - sets multiple variables that can be used by content managers in the page manager form (including the WYSIWYG editor)
*eV::pageContentAttribSet($replaceString,$resultString);
+
*[[functions:pageContentAttribSet|pageContentAttribSet]] - sets a single variable that can be used by content managers in the page manager form (including the WYSIWYG editor)
*eV::pageContentAttribSetStart($replaceString) / eV::pageContentAttribSetEnd()
+
*[[functions:pageContentAttribSetStart/pageContentAttribSetEnd|pageContentAttribSetStart/pageContentAttribSetEnd]] - wrapper that the contents of which is set as a single variable that can be used by content managers in the page manager form
  
 
;Retrieve Page Content to Build Pages
 
;Retrieve Page Content to Build Pages
*[[eV::pageMenuGet($menuId=NULL)]] returns $arrMenu (array)
+
*[[functions:pageMenuGet|pageMenuGet]] - returns menu item data
*eV::pageChildrenGet($pageId,$fieldList=NULL,$orderBy=NULL,$orderDir=(DESC,ASC),$orderType(str,num)) returns $arrChildren (array)
+
*[[functions:pageChildrenGet|pageChildrenGet]] - returns page data for children of a specific page
*eV::pageSearchGet($keywords,$fieldList=NULL,$orderBy=NULL,$orderDir=(DESC,ASC),$orderType(str,num)) returns $arrSearch (array)
+
*[[functions:pageSearchGet|pageSearchGet]] - returns page data for pages qualifying for a keyword search
*[[eV::pageZoneGet($zoneIdOrName,$pageId,$dBug=0)]] returns bannerOutput (string)
+
*[[functions:pageZoneGet|pageZoneGet]] - returns code to display an banner ad zone
*eV::pageForumPostsGet($userId=NULL,$pageId=NULL,$templateIdList=NULL,$fieldList=NULL,$orderBy=NULL) returns array (forumPostLink,ratingCount,ratingCount[1-5],ratingTotal,ratingAverage,posts[])
+
*[[functions:pageForumPostsGet|pageForumPostsGet]] - returns forum post data for posts submitted to a particular forum page
*eV::pagePollQuestionsGet($pageId)
+
*[[functions:pagePollQuestionsGet|pagePollQuestionsGet]] - returns question and answer data for building a poll
*eV::pagePollResultsGet($pageId)
+
*[[functions:pagePollResultsGet|pagePollResultsGet]] - returns poll submission data for building a report of poll results
*eV::pageBreadcrumbsFamilyGet($pageId)
+
*[[functions:pageBreadcrumbsFamilyGet|pageBreadcrumbsFamilyGet(]] - returns breadcrumb data by traversing parent pages
*eV::pageBreadcrumbsHistoryGet($pageId,$breadcrumb)
+
*[[functions:pageBreadcrumbsHistoryGet|pageBreadcrumbsHistoryGet]] - returns breadcrumb data by traversing linear browsing history
*eV::pageProductsGet($pageId,$fieldList)
+
*[[functions:pageProductsGet|pageProductsGet]] - returns product data for products related to a specific page
*eV::prodOptionString2Array($optionValue)
+
*[[functions:recentlyViewedGet|recentlyViewedGet]] - returns data for recently viewed pages
*eV::recentlyViewedGet($fieldList) //returns array of page data for recently viewed items
+
*[[functions:pageCustomSearchGroup:pageCustomSearchGroup]] - returns Custom Search Group data used to build a custom search widget
*[[eV::pageCustomSearchGroup($groupIdOrName)]] // returns array[groupName,groupId,groupNotes,selectField,options[optionsId,optionName,link]]
+
  
 
;Retrieve User Content to Build Community (Web 2.0) Pages
 
;Retrieve User Content to Build Community (Web 2.0) Pages
*eV::usersGet($fieldList,$userIdList,$orderBy=NULL,$orderDir="DESC",$orderType="str")
+
*[[functions:usersGet|usersGet]] - retrieve user data from a list of user ids
*eV::userBlogEntriesGet($fieldList,$orderBy=NULL,$userId=NULL)
+
*[[functions:userBlogEntriesGet|userBlogEntriesGet]] - retrieve blog entry data belonging to a specific user
*eV::userFriendsGet($fieldList,$userId=NULL) // userId defaults to session.user.userId. returnes 2 dim array [index][fieldName] for users that are on $userId's friend list
+
*[[functions:userFriendsGet|userFriendsGet]] - retrieves data for users in a specific user's 'friend list'
*eV::userWishListGet($fieldList,$userId=NULL); // userid defaults to session.user.userid. returns 2 min array[index][fieldName] for pages that are on $userIds wish list
+
*[[functions:userWishListGet|userWishListGet]] - retrieves product data for products in a specific user's wish list
*eV::usersAmbassadorGet($fieldList);
+
*[[functions:usersAmbassadorGet|usersAmbassadorGet]] - retrieves user data for users that are classified as 'ambassadors'
  
 
;Retrieve Order Content to Build Cart and Checkout Pages
 
;Retrieve Order Content to Build Cart and Checkout Pages
*eV::orderGetPayTypes() // returns array of ACTIVE pay types, dim 2: payType, payTypeName
+
*[[functions:orderGetPayTypes|orderGetPayTypes]] - returns data relating to active paytypes in the system
*eV::userGetAddresses($fieldList,$userId=NULL) // userId defaults to session.user.userId if empty. returns multidimarray, first dim = address index, 2nd dim is keys for each field. can pass fieldList to limit fields returned
+
*[[functions:userGetAddresses|userGetAddresses]] - returns data for all addresses belonging to a specific user
  
 
;Set Tracking Functions
 
;Set Tracking Functions
*eV::recentlyViewedAdd($pageId) // appends recently viewed array
+
*[[functions:recentlyViewedAdd|recentlyViewedAdd]] - registers a page to the recently viewed history when viewed
  
 
;User Management Functions
 
;User Management Functions
*eV::userAccountEdit($fieldList,$exitLocation=NULL,$userId=NULL) exitLocation reloads same page if empty. Also exitLocation can be passed as a post variable. userId defaults to session.user.userId. returns array [values]array [customFieldTags]array [message]string
+
*[[functions:userAccountEdit|userAccountEdit]] - manages user account information
*eV::userAddressAddEdit($fieldList) returns array [values]array [message]string
+
*[[functions:userAddressAddEdit|userAddressAddEdit]] - manages user addresses
*eV::userBlogEntryAddEdit($fieldList,$userId=NULL)
+
*[[functions:userBlogEntryAddEdit|userBlogEntryAddEdit]] - managers user blog entries
*eV::userBlogSetup($pageId=NULL,$userId=NULL) // page id defaults to first page belonging to user that is blog main page // userId defaults to session userId // adds blog page if none, returns blog pageId either way
+
*[[functions:userBlogSetup|userBlogSetup]] - sets up a user with a blog
  
 
;Shortcut Functions that just plain make your job easier
 
;Shortcut Functions that just plain make your job easier
*eV::redirect($location)
+
*[[functions:redirect|redirect]] - redirects visitors to another page
*eV::valueArrayFromQuery($query,$fieldName)
+
*[[functions:valueArrayFromQuery|valueArrayFromQuery]] - returns a single dimension array of values based on the contents of a specific column in all records of a query
  
 
;Functions used by internal actions, you probably will not use
 
;Functions used by internal actions, you probably will not use
*eV::ipBlockCheck($ipAddress,$forwardOnBlock=NULL) // returns T/F if address is blocked. if forwardOnBlock is passed, then it forwards to URL
+
*[[functions:ipBlockCheck|ipBlockCheck]] - checks if an IP is registered to the block list
 +
*[[functions:prodOptionString2Array|prodOptionString2Array]] - converts a string of product option data to an array

Revision as of 15:19, 2 October 2008

A series of custom functions are created to allow content management to easily access content they require to build the copy in templates:

Quick Output of State/Country Options in a Form Select
Set Variables that Content Managers can use in the WYSIWYG copy editor
  • pageContentAttribsSet - sets multiple variables that can be used by content managers in the page manager form (including the WYSIWYG editor)
  • pageContentAttribSet - sets a single variable that can be used by content managers in the page manager form (including the WYSIWYG editor)
  • pageContentAttribSetStart/pageContentAttribSetEnd - wrapper that the contents of which is set as a single variable that can be used by content managers in the page manager form
Retrieve Page Content to Build Pages
Retrieve User Content to Build Community (Web 2.0) Pages
  • usersGet - retrieve user data from a list of user ids
  • userBlogEntriesGet - retrieve blog entry data belonging to a specific user
  • userFriendsGet - retrieves data for users in a specific user's 'friend list'
  • userWishListGet - retrieves product data for products in a specific user's wish list
  • usersAmbassadorGet - retrieves user data for users that are classified as 'ambassadors'
Retrieve Order Content to Build Cart and Checkout Pages
Set Tracking Functions
User Management Functions
Shortcut Functions that just plain make your job easier
  • redirect - redirects visitors to another page
  • valueArrayFromQuery - returns a single dimension array of values based on the contents of a specific column in all records of a query
Functions used by internal actions, you probably will not use