Jian - That worked! Thanks a lot!
On Thu, Aug 9, 2012 at 4:04 AM, Jian Huang <[email protected]> wrote:
> Ooops, I accidentally deleted a )
>
> <%!!
> Escape:Text(<%med_pdf%>).Substring(Escape:Text(<%med_pdf%>).LastIndexOf(.))
> !!%>
>
>
> On Wednesday, August 8, 2012 4:04:32 AM UTC-7, Ravi Garg wrote:
>>
>> 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/-/MsDDC0mN7FEJ.
>
> 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.
>
--
Ravi Garg
[email protected]
+61 427 966 001
LinkedIn Profile <http://www.linkedin.com/in/gargravi>
--
You received this message because you are subscribed to the Google Groups
"RedDot CMS Users" group.
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.