Custom Module Widget Templates
Hi,
Is there an easy way to get the Image URL, Document URL and Document Title to reference in a Widget template for a custom Module.
I have a module with 3 items.
* Title (Text)
* Image (Media -Image)
* Document (Media - Documents)
Simply I want my template to look like
<a href=documentURL>imageDocumentTitle</a>
I've tried most of the options and non seem to give me what I'm after.
any help would be appreciated.
here is an extract of the test template I've been messing with.
<
div
class
=
"sfitemDetails"
>3
<
sf:SitefinityLabel
ID
=
"mainShortTextFieldLiteral"
runat
=
"server"
Text='<%# Eval("Title") %>' WrapperTagName="h1" HideIfNoText="true" CssClass="sfitemTitle" />
<
sf:FieldListView
ID
=
"PublicationDate4"
runat
=
"server"
Format
=
"PublicationDate.ToLocal():MMM d, yyyy, HH:mm tt"
WrapperTagName
=
"div"
WrapperTagCssClass
=
"sfitemPublicationDate"
/>
<
sf:DetailsViewHyperLink
runat
=
"server"
DataFieldName
=
"Document"
id
=
"link"
>
<
sf:AssetsField
runat
=
"server"
DataFieldName
=
"ImageThumb"
/></
sf:DetailsViewHyperLink
>
<
sf:AssetsField
runat
=
"server"
DataFieldName
=
"Document"
/>
</
div
>
<
sitefinity:TextField
runat
=
"server"
DisplayMode
=
"Read"
Value='<%# Eval("document")%>' />
<
sf:SitefinityHyperLink
ID
=
"documentLink"
Text="<%$ Resources:Labels, Download %>" runat="server" CssClass="sfdownloadLink" target="_blank" />
<
br
/>urlName:<
sitefinity:TextField
runat
=
"server"
DisplayMode
=
"Read"
Value='<%# Eval("UrlName")%>' />
<
br
/>Doc<
sitefinity:TextField
runat
=
"server"
DisplayMode
=
"Read"
Value='<%# Eval("Document")%>' />
<
br
/>ImageThumb<
sitefinity:TextField
runat
=
"server"
DisplayMode
=
"Read"
Value='<%# Eval("ImageThumb")%>' />
<
br
/>URLs <
sitefinity:TextField
runat
=
"server"
DisplayMode
=
"Read"
Value='<%# Eval("Urls")%>'
Hey Byzza,
Did you ever figure this out? I need to do the same exact thing.
Hi Matt,
No, I haven't found a solution as of yet. I ended up putting this change on hold for a while.
If you would it out, I would be interested to see you solution.
Regards
Byron