Posted By

webpolk on 04/03/12


Tagged

tags some


Versions (?)

DCT stuff


 / Published in: PHP
 

URL: NONE

COMMENTS

  1. {assign var="contentType" value="{$feedItem->getType()}"}
  2. {assign var="isOpen" value="{$feedItem->isOpen()}"}
  3. {assign var="locked" value="{!$feedItem->isCloseable()}"}
  4. {assign var="recommendedArray" value=$feedItem->getRecommendations()}
  5.  
  6. {counter name="moduleCounter" assign='moduleCounter'}
  7. {assign var="link.location" value="Module$moduleCounter"}
  8. {assign var="link.type" value={$feedItem->getType()|lower}}
  9. {assign var="link.property" value=$feedItem->getProperty()->getCode()}
  10. {assign var="link.description" value=$feedItem->getTitle()}
  11.  
  12. <article class="feed-item show-module {$contentType|lower}-module {ternary value=$isOpen true='' false='collapse'} {ternary value=$env->isMobile() true='mobile' false=''}">
  13. <meta name="location" content="Module{$moduleCounter}" />
  14. <meta name="type" content="{$feedItem->getType()|lower}" />
  15. <meta name="property" content="{$feedItem->getProperty()->getCode()}" />
  16. <meta name="description" content="{$feedItem->getTitle()}" />
  17.  
  18. <a href="{$feedItem->getProperty()->getUrl()}" title="{$feedItem->getProperty()->getDisplayName()}" {track link='showlogo'}><img class="property" src="{$feedItem->getProperty()->getImageUrl()}" alt="{$feedItem->getProperty()->getDisplayName()}" data-propertyCode="{$feedItem->getProperty()->getCode()}" /></a>
  19. <img src="{$feedItem->getImage(300,169)->getUrl()}" class="promo" {if !$locked} onclick="Utils.dispatchEvent(this, 'expand')" {/if} {track link='image'} />
  20. <hgroup>
  21. <h2>
  22. <span class="category">{$contentType|capitalize}</span>
  23. {if !is_null($feedItem->getDate())}
  24. <time datetime="{$feedItem->getDate()->format('U')|date_format:"%Y-%m-%dT%H:%M%z"}" pubdate="pubdate">Posted {relativeTime date=$feedItem->getDate()}</time>
  25. {/if}
  26. </h2>
  27. <h1 {if !$locked}onclick="Utils.dispatchEvent(this, 'expand')"{/if} {track link='title'} title="{$feedItem->getTitle()}">{$feedItem->getTitle()|truncate:85}</h1>
  28. </hgroup>
  29. <p>
  30. {$feedItem->getText()|truncate:200}
  31. {if !$locked}
  32. <span class="cta" onclick="Utils.dispatchEvent(this, 'expand')" {track link='cta'}>{$feedItem->getCallToAction()|replace:' ':'&nbsp;'}{if $feedItem->getCallToAction() != ""}{ternary value=$feedItem->isOpen() and $env->isMobile() true='' false='&nbsp;���»'}{/if}</span>
  33. {/if}
  34. </p>
  35.  
  36. {if !$locked}
  37. <p class="sharegroup"><span class="share {ternary value=$isOpen true='hidden' false=''}" onclick="Utils.dispatchEvent(this, 'expand')" {track link='share'}>Share</span></p>
  38. <button type="button" class="close persistent" onclick="Utils.dispatchEvent(this, 'collapse')">x Close</button>
  39. <button type="button" class="close" onclick="Utils.dispatchEvent(this, 'collapse')">x Close</button>
  40. {/if}
  41. {* Content div expands and collapses. All elements within content div are hidden when module is collapsed *}
  42. <div class="content">
  43. {block name="content"}
  44. {/block}
  45. {* make sure that we have at least one item before continuing *}
  46. <div class="recommendations">
  47. {if count($recommendedArray) > 0}
  48. <h3>Recommendations</h3><br />
  49. <ul>
  50. {foreach from=$recommendedArray item=rec}
  51. <li>{include file="Tile.tpl" tile=$rec->getAsset()}</li>
  52. {/foreach}
  53. </ul>
  54. {/if}
  55. {include file="ads/ModuleCompanionAd.tpl" adID="div-gpt-ad-companionAd-{$feedItem->getuuid()}"}
  56. </div>

Report this snippet  

You need to login to post a comment.