Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Currently I have a editable document download via the cms..
Code: Select all
</cms:editable>
    <cms:editable
  name='download'
  label='Downloadable File'
  desc='Upload the file here'
  type='file'
/>


shown on a page by
Code: Select all
<a href="<cms:show download />">Download</a>


Is it possible to have this link ONLY show if a value is defined in the cms for the file download? So if there isn't one there isn't a link that says download that goes no where?
You definitely could do this, the 'if' tag is meant for this type of situation.
http://www.couchcms.com/docs/tags-reference/if.html
Code: Select all
<cms:if download ><a href="<cms:show download />">Download</a></cms:if>

You would simply wrap the entire 'a' tag with a couch 'if' tag. Alternatively if you wanted to display a message in the situation where there was no download link defined, you could do something like this.
Code: Select all
<cms:if download ><a href="<cms:show download />">Download</a><cms:else/><p>Sorry, no download is available.</p></cms:if>
cheesypoof wrote: You definitely could do this, the 'if' tag is meant for this type of situation.
http://www.couchcms.com/docs/tags-reference/if.html
Code: Select all
<cms:if download ><a href="<cms:show download />">Download</a></cms:if>

You would simply wrap the entire 'a' tag with a couch 'if' tag. Alternatively if you wanted to display a message in a situation where there was no download link defined, you could do something like this instead.
Code: Select all
<cms:if download ><a href="<cms:show download />">Download</a><cms:else/><p>Sorry, no download is available.</p></cms:if>

Great, thank you very much! :)
3 posts Page 1 of 1
cron