Cert++
Close

Content link functions in content asset markup

Key Takeaway

Content link functions are $...$ placeholders in content asset HTML that B2C Commerce rewrites when the storefront renders the content. $url()$ builds an absolute URL that keeps the protocol of the incoming request, while $httpUrl()$ and $httpsUrl()$ force http or https.

A content link function is a placeholder, wrapped in dollar signs, that you write inside the HTML of a content asset. When the storefront renders the content, B2C Commerce rewrites each placeholder into a working URL or into included content. Because of that rewriting, merchants can link to pipelines, static images, and other server output without hard-coding host names or protocols.

What content link functions do

A content asset most often holds HTML that appears on the storefront as a standalone page or inside another page. An about us page and a sizing table are two examples.

That HTML can contain content link functions. They link to other content assets, search results, product detail pages, or static files such as images.

A link to an external site needs no function. You write a normal HTML href, such as http://www.demandware.com/. An email link uses a normal mailto: address.

B2C Commerce Developer Study Guide

Checklist progress

0/237Learned

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other B2C Commerce Developer studiers. 796 members and growing.