Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
Hi, i have a securefile type that used for user avatar :
Code: Select all
<cms:editable
         name='user_ava'
         label='User Ava'
         type='securefile'
         allowed_ext='jpg, jpeg, png, gif'
         max_size='2048'
         show_preview='1'
         preview_width='150'
         group='section_1'
         order='1'
      />


I want, when user register if he upload an avatar, couch will serve user avatar, if no couch will serve default image for user avatar, lets say "default-ava.png".

I try use not_empty :
Code: Select all
<cms:if "<cms:not_empty user_ava />" >
   
   <cms:show_securefile 'user_ava' >
      <img src="<cms:cloak_url link=file_id  />" />
   </cms:show_securefile>
   
<cms:else />

      <img src="http://myweb/img/default-ava.png" />
      
</cms:if>


But not work :(
As soon as possible!

Touch me up : abada[dot]zulma[at]gmail[dot]com
@GoingMarryAsap, curiously I replied to almost exactly the same query just yesterday -
viewtopic.php?p=21381#p21381

Hope it helps.
Thx KK!
As soon as possible!

Touch me up : abada[dot]zulma[at]gmail[dot]com
3 posts Page 1 of 1