Hey guys.
I am adding attachment functionality to some pages on the couch site I am currently working on.
What the client desires is the ability to upload a file, and have it displayed as an attachment just like you would see in an email.
I am going off of the following code in the couch Databound Forms :
The final version will be more like
What I want to do is something similar to how php's pathinfo(); works, and simply weed out the extension. This is so I can put file type thumbnails next to the attachment listing at the bottom of the page.
Is there any function in couch that would do this?
EDIT:
Here is the code I am testing with. I am getting eval errors (syntax error, unexpected ':') from what looks to be the <cms:show> tag inside the pathinfo function :
I am adding attachment functionality to some pages on the couch site I am currently working on.
What the client desires is the ability to upload a file, and have it displayed as an attachment just like you would see in an email.
I am going off of the following code in the couch Databound Forms :
- Code: Select all
<cms:editable name='resume' required='1' allowed_ext='pdf, doc, docx' max_size='1024' type='securefile' />
The final version will be more like
- Code: Select all
<cms:editable name='attachment' required='0' allowed_ext='pdf, doc, docx, xls, xlsx' max_size='1024' type='securefile' />
What I want to do is something similar to how php's pathinfo(); works, and simply weed out the extension. This is so I can put file type thumbnails next to the attachment listing at the bottom of the page.
Is there any function in couch that would do this?
EDIT:
Here is the code I am testing with. I am getting eval errors (syntax error, unexpected ':') from what looks to be the <cms:show> tag inside the pathinfo function :
- Code: Select all
<cms:php>
$extension = pathinfo(<cms:show attachment_file />);
$extensionx = extension['extension'];
echo $extensionx;
</cms:php>