UDT for News file giving filesize

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
The Peckham Plater
New Member
New Member
Posts: 2
Joined: Mon Jan 26, 2009 11:30 pm

UDT for News file giving filesize

Post by The Peckham Plater »

Hi, I'm a new CMSMS user over from typolight, joomla and others. CMSMS looks great for my needs so I'm trying my best to work it out.

I am setting up the news module and wanting to add a PDF file for download using a custom Field Definition.

Desired result is:
Content editor can upload PDF file for frontend download when publishing a news item.
Article displays linked file name and file size for polite user experience.

I know there are many forum posts about offering files instead of the default image handling only. Unfortunately nothing that I can get working or really understand at this stage. I have found the UDT for filesize which looks perfect for the job.

Question is, is there/tag a way to auto populate the link (file=) and name (name=) even tho they are already within a UDT tag?

Code: Select all

{if $field->type == 'file'}
    Download attachment: 
    <a class="pdf" href="{$entry->file_location}/{$field->value}">{filelink file='uploads/news/id2' name='Grab Name of File'}
</a>
{/if}
Any help very much appreciated.
Post Reply

Return to “Modules/Add-Ons”