Hi Jian,
Not sure whats going wrong but that did not work. I tried the following
code & none of the placeholders (Media or Attribute) worked. They both
return nothing.
med_pdf - is the media placeholder
att_pdf - is the attribute placeholder to get the file name out of med_pdf.
<!-- <%med_pdf%> -->
<%att_pdf%><br />
ext- <%!!
Escape:Text(<%med_pdf%>.Substring(Escape:Text(<%med_pdf%>).LastIndexOf(.))
!!%>
ext- <%!!
Escape:Text(<%att_pdf%>.Substring(Escape:Text(<%att_pdf%>).LastIndexOf(.))
!!%>
Thanks,
Ravi
On Wednesday, August 8, 2012 4:02:14 AM UTC+10, Jian Huang wrote:
>
> Ravi!
>
> Solution:
>
> <%!! Escape:Text(<%att_med_pdf_filename%>.Substring(Escape:Text(
> <%att_med_pdf_filename%>).LastIndexOf(.)) !!%>
>
> On Monday, August 6, 2012 5:10:27 PM UTC-7, Ravi Garg wrote:
>>
>> Currently I'm using PreExecute code with ASP function to get the file
>> extension from an Attribute(Media) placeholder. Pls see the code below
>> <%=GetFileExtension("<%att_med_pdf_filename%>")%>
>>
>> I would like to get the same result using render tag, Is that possible
>> with something like the code below?
>> Context:CurrentPage.Elements.GetElement(att_med_pdf_filename).Value
>>
>> Thanks,
>> Ravi
>>
>>
>>
>>
--
You received this message because you are subscribed to the Google Groups
"RedDot CMS Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/reddot-cms-users/-/DkShpu1xz-gJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/reddot-cms-users?hl=en.