Asset urls in an asset listing


(Richard Crompton) #1

I have an asset listing that displays for each respective asset:

<li>    <div class="img-bg">
       <img src="%asset_thumbnail_v_w200_url%" alt="%asset_thumbnail_alt%" />
       <div class="desc">%asset_metadata_dc.description%</div>
   </div>
   <div class="title">
      <h3>%asset_short_name_linked%</h3>
      <!--span class="favourite" title="Add to favourite">Add to favourite</span-->
   </div>
</li>

 

I need to add on onclick event to the <li> and need it to give me the url of this asset.

 

If I use %asset_short_name_linked% I get the full anchor tag and if I use %asset_url% I get the urel of the page that displays the asset listing.

 

So what is the tag to get just the url of the asset that is being iterated in the listing?


(Richard Crompton) #2

Ignore that, I've just fixed if %asset_href% - don't know why I didn't try it!


(Nic Hubbard) #3

Ignore that, I've just fixed if %asset_href% - don't know why I didn't try it!

 

%asset_href% will just give the relative URL, while %asset_url% will give the absolute. Strange that you said that second keyword wasn't working for you, as it should be listing the URL of the listed asset.