Created
September 29, 2014 18:13
-
-
Save ryanschuhler/d6c0f61e5f7035d2698a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #set ($render_default = true) | |
| #set ($content_targeting_logic_article_id = "XXXXXXXX") | |
| #if ($target_user && ($target_user.getData() != "")) | |
| ## Parse targeting logic to see if targeted content should be served | |
| #parse("${journalTemplatesPath}/${content_targeting_logic_article_id}") | |
| ## If user qualifies as target, then embed another article instead of the current one. | |
| #foreach ($targets in $target_user.siblings) | |
| #set ($article_id = $targets.article_id.data) | |
| #foreach ($target in $stringUtil.split($targets.data)) | |
| #if (($target == $target_country) || ($target == $target_persona) || (($target == "hubspot") && $hs_contact)) | |
| #set ($render_default = false) | |
| #set ($namespace = "${reserved-article-id}-${velocityCount}") | |
| #if ($article_id != "") | |
| #set ($namespace = $article_id) | |
| #end | |
| <div id="embedded-targeted-article-$namespace"> | |
| <runtime-portlet name="56" instance="targeted_$namespace" queryString=""/> | |
| </div> | |
| #break | |
| #end | |
| #end | |
| #end | |
| #end | |
| #if ($render_default) | |
| ## Render content from the current article | |
| #end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment