![]() |
Products |
> AspTear |
Support |
> FAQ |
Free Tools |
> Free Components |
Leistungen |
Service |
> Über uns |
Home | Products | Support Central | Buy! | About Us |
Creating Portal Page LinksThis document describes how to create links on your pages that allow the linked pages to be indexed by spiders while not having to change the linked pages themselves. You learn how to use the supporting ASP function library of PortalPageFilter. The ASP Function LibraryThe ASP function library is contained in the file ppfhelpers.asp, which you can download with the Sample Application. It helps you to automatically convert links like http://www.mywebstore.com/product.asp?pid=20001 to http://www.mywebstore.com/PPF/pid/20001/product.asp It contains the following functions: Function GenerateURLFromArray(ByVal strURI, ByRef arrParameters, ByRef arrValues) Function GenerateURL_OneParam(ByVal strURI, ByRef strParamName, ByRef strParamValue) Function GenerateThis_OneParam(ByRef strParamName, ByRef strParamValue) Function GenerateThis_FromArray(ByRef arrParameters, ByRef arrValues) The functions perform the following tasks:
Using the Function LibraryThe Sample Application ships with a demonstration example named simpleconsumer.asp. It demonstrates how to use each of the ASP functions properly. GenerateURLFromArrayThe following code demonstrates how to use GenerateURLFromArray: <!-- #include file="ppfhelpers.asp" --> <% strFilename = Request.ServerVariables("SCRIPT_NAME") arrParameters = Array("name", "country") arrValues = Array("Hans Mustermann", "Übersee") strURL = GenerateURLFromArray(strFilename, arrParameters, arrValues) %> The resulting portal page link looks like this: /PPF/name/Hans+Mustermann/country/%DCbersee/simpleconsumer.asp A standard (non-indexable) URL with query string for this request would look like: /simpleconsumer.asp?name=Hans+Mustermann&country=%DCbersee GenerateURL_OneParamThe following code demonstrates how to use GenerateURL_OneParam: <!-- #include file="ppfhelpers.asp" --> <% strFilename = Request.ServerVariables("SCRIPT_NAME") strUrl = GenerateURL_OneParam(strFilename, "logourl", "/images/myfile.gif") %> The resulting portal page link looks like this: /PPF/logourl/%2Fimages%2Fmyfile%2Egif/simpleconsumer.asp GenerateThis_OneParamThe following code demonstrates how to use GenerateThis_OneParam: <!-- #include file="ppfhelpers.asp" --> <% strUrl = GenerateThis_OneParam("name", "Mr. Yates") %> The resulting portal page link looks like this: /PPF/name/Mr%2E+Yates/simpleconsumer.asp GenerateThis_FromArrayThe following code demonstrates how to use GenerateThis_FromArray: <!-- #include file="ppfhelpers.asp" --> <% strUrl = GenerateThis_FromArray(Array("age","city"), Array(90,"Phoenix")) %> The resulting portal page link looks like this: /PPF/age/90/city/Phoenix/simpleconsumer.asp Related Frequently Asked Questions |
|