From: Yaron K. <ya...@wi...> - 2012-02-20 22:09:50
|
Hi Andy, You have the following call: {{#arraymap:{{{Documents|}}}|,|x|[[Media:x|{{{Documents|}}}]]|<br/>}} Maybe it should just be this instead? {{#arraymap:{{{Documents|}}}|,|x|[[Media:x|x]]|<br/>}} -Yaron On Mon, Feb 20, 2012 at 3:06 PM, Piatt, Andrew W (Andy) <And...@pn...> wrote: > I've recently run into a problem using the [[Media::]] tag that I'm hoping someone else is aware of. We are using an array map to list out multiple files in a single template variable. The code looks something like: > > |class="left-cell"| Documents > | {{#showif:{{{Documents|}}}|{{#arraymap:{{{Documents|}}}|,|x|[[Media:x|{{{Documents|}}}]]|<br/>}}}} > > The idea being, if there are documents, show me said documents as a comma separated list of links to the files, named the file name. The problem we are running into is that the CSV list of documents is populating, the links work, but the title of each document in the array is being displayed for each of the files. This means that if there are 5 files in the Documents array, there will be 5 document links, and each name of each document will be a CSV list of the document names: > > Document 1, Document 2, Document 3, Document 4, Document 5 > Document 1, Document 2, Document 3, Document 4, Document 5 > Document 1, Document 2, Document 3, Document 4, Document 5 > Document 1, Document 2, Document 3, Document 4, Document 5 > Document 1, Document 2, Document 3, Document 4, Document 5 > > Does anyone know of a way to handle multiple documents in an array, link to them, and only have the individual document name show up? If this was PHP I would just iterate through the array and print the portions that I wanted. > > Thanks in advance. > > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2 > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user -- WikiWorks · MediaWiki Consulting · http://wikiworks.com |