Forum Index

No notifications
Notifications

Favorites

No favorites found
General Training Discussion General chat and comment on KnowledgeKube training
Subscribe to post
User avatar
matt.pitman - (28/09/2016 12:17:51)
RE:URL Parameters and Dynamic Pages
Hi again Manny, CDS includes a QUERYSTRING element type that allows you to use values from your browser's query string to build dynamic content. An example of this would be if you had two Markup Assets, the first named Dynamic-apple:

I like apples

The second called Dynamic-orange:

I like oranges

If your page contained the following markup it would display both sets of content:
<%# ASSET(Dynamic-Apple) %>
<%# ASSET(Dynamic-Orange) %>
However, if you introduced a query string property named fruit, and modified your page's markup as follows:
<%# ASSET(Dynamic-<%# QUERYSTRING(fruit) %>) %>
The page would only display the asset whose name matched the combined static text and query string value. So if you included the following query string in your URL:
?fruit=orange
The resulting page would attempt to display the asset named Dynamic-orange. Let me know if you need any further help. Kind regards.
RSS Feed