[campsite-support] List articleattachment
  • Hey all,

    I'm trying to display the latest wmv attachment from all articles on the frontpage. As far as I know the code below should work. However it ignores the 'length 1' attribute and it displays all article attachments with the wmv extension. Am I missing something?? Thanks in advance!!









    ...code...





  • 1 Comment sorted by
  • Hi,

    Your code will display the first attachment of each article in the issue because:
    1. you list all issue articles ()
    2. for each article list the first attachment ()

    So you'll end up with a list of attached files, each from a different article. To display the
    latest attachment from all articles you need the following code:




    ....







    However this does not guarantee the link is a wmv file. You can add the condition "if
    articleAttachment extension is wmv" immediately after "if list end". But for this to work you must
    make sure the wmv attachment is always the latest one in the article attachments list when editing
    the article.

    Hope this helps,
    Mugur

    --- nkerkvliet@hotmail.com wrote:
    > Hey all,
    >
    > I'm trying to display the latest wmv attachment from all articles on the frontpage. As far as I
    > know the code below should work. However it ignores the 'length 1' attribute and it displays all
    > article attachments with the wmv extension. Am I missing something?? Thanks in advance!!
    >
    >
    >
    >
    >
    >
    >
    >
    >
    > ...code...
    >
    >
    >
    >
    >
    >
    >




    ____________________________________________________________________________________
    Access over 1 million songs - Yahoo! Music Unlimited
    (http://music.yahoo.com/unlimited)