set_col_dynalink()

Now supports local array (version 6) !

  • Parameter(s):
    • $col_name: Name of column to display dynamic URL
    • $baseLinkUrl: The base URL. e.g. “http://www.example.com”
    • $dynaParam: Name of a single data field OR an array of multiple fields. The default is “id” if omitted.
    • $staticParam: Optional. Parameters with static value in addition to $dynaParam. They are added to the end of the URL string. e.g. “&foo=bar”
    • $target: Optional. This sets the value of the hyperlink “Target” attribute. The available options are:
      • _new
      • _blank
      • _top
      • _parent
    • $prefix: prefix to hyperlink
  • Description:
    • This method sets a specific column to display HTML hyperlink URL based on dynamic values. It is different from set_col_link() method where it is simply a static link stored in a data field.
  • Remark:
    • Developers should always check the validity of the dynamic URL constructed when using this method.
  • Example:
1
2
3
4
// a single dynamic field as $dyanParam parameter
$dg -> set_col_dynalink("productCode", "http://www.example.com/", "orderNumber", '&foo=bar', "_top");
// an array of multiple dynamic fields as $dynaParam parameter
$dg -> set_col_dynalink("productCode", "http://www.example.com/", array("orderNumber", "customerNumber", "price"), '&foo=bar', "_top");