Hi, i have a securefile type that used for user avatar :
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 :
But not work
- 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