Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Powellze 38 posts 73 karma points
    Jul 06, 2009 @ 16:37
    Powellze
    0

    CWS News and Events - Images

    Hi Everyone,

    I am looking for a bit of help with regards to CWS and a customised ListNewsEvents.xslt, I am currently showing the top three items from a news area.

    I want to add to the three items there relevant image from within the news item page, has anyone got any ideas?

     

    Thanks!

  • Warren Buckley 2106 posts 4836 karma points MVP ∞ admin hq c-trib
    Jul 06, 2009 @ 17:08
    Warren Buckley
    3

    Hi Powellze,
    Yes I can help you with this just as a friendly reminder the CWS project that I run has its own dedicated forum so I can help find these CWS questions easier.

    http://our.umbraco.org/projects/creative-website-starter-%28cws%29

    In the XSLT that lists out the news & events add this inbetween the xsl:for-each tags.

    <!-- Check if articlePhoto property is NOT blank/empty -->
    <xsl:if test="data [@alias ='articlePhoto'] != ''">
        <!--
        Write out the image with the source from the articlePhoto property
        and the alt tag being the name of that news/event node
        -->
           
        <img src="{data [@alias ='articlePhoto']}" alt="{@nodeName}" />
    </xsl:if>

    If you need help for me to explain in more detail the code snippet let me know.

    Warren :)

  • Powellze 38 posts 73 karma points
    Jul 06, 2009 @ 18:20
    Powellze
    0

    Thank you Warren, I have given you a thumbs up!

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jul 06, 2009 @ 18:40
    Dirk De Grave
    0

    Damn, can't move those threads to the project's forum. Let me add that request for a future release!

     

    Cheers,

    /Dirk

  • Warren Buckley 2106 posts 4836 karma points MVP ∞ admin hq c-trib
    Jul 07, 2009 @ 09:29
    Warren Buckley
    0

    Powellze, if this has worked for you please could you mark my reply as the answer so other people in the future can easily find answers to these questions on the forum.

    Thanks,
    Warren

Please Sign in or register to post replies

Write your reply to:

Draft