Article

How to use related image in the list view and open the Items details view

« Go Back

Information

 
EnvironmentSitefinity-Sitefinity_Online_Marketing_Support_24x5_1yr-Windows-Windows Server 2012 R2
Question/Problem Description
When add a related Image field to the List view and click on it it opens the image full size. I need to change the behaviour and the details view of the respective Item to be opened. instead.
Steps to Reproduce
Clarifying Information
Error Message
Defect/Enhancement Number
Cause
Resolution
In the List view use the following sample code:
<a href='<%# HttpContext.Current.Request.Url.AbsolutePath + Eval("ItemDefaultUrl")%>'>
    <div class="sfMultiRelatedItmsWrp">
        <h2 class="sfrelatedItmTitle"></h2>
        <ul class="sfrelatedList sflist">
            <asp:Repeater ID="Repeater1" runat="server" DataSource='<%# Eval("<RELATE_IMAGE_FIELD_NAME>") %>'>
                <ItemTemplate>
                    <li class="sfrelatedListItem sflistitem">
                        <img src='<%# Eval("ThumbnailUrl")%>' alt='<%# Eval("AlternativeText")%>' title='<%# Eval("Title") %>' />
                    </li>
                </ItemTemplate>
            </asp:Repeater>
        </ul>
    </div>
</a>

 
Workaround
Notes
Attachment 
Last Modified Date3/20/2017 4:11 PM
Disclaimer

The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.



Feedback
 
Was this article helpful?

   

Your feedback is appreciated.

Please tell us how we can make this article more useful.



Characters Remaining: 255