List Info

Thread: List articleattachment




List articleattachment
user name
2006-10-28 13:34:31
Hi,

Your code will display the first attachment of each article
in the issue because:
1. you list all issue articles (<!** list article order
bydate desc>)
2. for each article list the first attachment (<!** list
length 1 articleAttachment>)

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:

<!** list article order bydate desc>
    <!** list articleAttachment>
        <!** if list end>
            <p><!** print article
name>....</p>
            <!-- display the link to the attachment
-->
        <!** endif>
    <!** endlist>
<!** endlist>

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

--- nkerkvliethotmail.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!!
> 
> <!** local>
> <!** publication "Het Nieuwsbedrijf">
>         <!** issue current>
>         <!** section off>
> <!** list article order bydate desc>
> <!** list length 1 articleAttachment>
> <!** if articleAttachment extension is wmv>
> 
> ...code...
> 
> <!** endif>
> <!** endlist>
> <!** endlist>
> 
> <!** endlocal> 
> 



 
____________________________________________________________
________________________
Access over 1 million songs - Yahoo! Music Unlimited 
(http://music.yahoo.c
om/unlimited)

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )