How do I use URLs for custom scripts when using CDSEO Pro?
Posted by Nick Poindexter on 04 March 2010 04:20 PM
To retrieve a url with correct extension, you include the file:
include_once $xcart_dir."/modules/cdseolinks/cdseo_convert_urls.php";

And then use the function:
wcmcdseoGetUrl($in_replaceid, $in_type, $in_page='');

In the format:
$url = wcmcdseoGetUrl(cdseoReplaceID,cdseoType,pageid);

$url = wcmcdseoGetUrl(3,"category",4);
$url = wcmcdseoGetUrl(16,"product");
$url = wcmcdseoGetUrl(3,"manufacturer");
$url = wcmcdseoGetUrl(1,"staticpage");

If cdseo is enabled, the function will return a CDSEO Pro url value.
If disabled, replacement for the type is toggled off, or no cdseo value exists, it will return the default urls, i.e.:
$url = wcmcdseoGetUrl(3,"category",4); // home.php?cat=3&page=4
$url = wcmcdseoGetUrl(16,"product"); // product.php?productid=16
$url = wcmcdseoGetUrl(3,"manufacturer"); // manufacturer?manufacturerid=3
$url = wcmcdseoGetUrl(1,"staticpage"); // pages.php?pageid=1

Comments (0)
Post a new comment
Full Name: