It's great that you managed to get this working, despite all obstacles. :)
There should be an easier solution soon - I changed the parsing of #arraymap
and #arraymaptemplate a while ago so that "\n" represents a newline in the
"delimiter" value, but for some reason I never made that same change in the
"new delimiter" value. It's a very simple change, that should go into the
next version of SF.

-Yaron


On Sun, May 10, 2009 at 3:07 PM, Dan Bolser <[email protected]> wrote:

>
> 2009/5/10 tosfos <[email protected]>:
> >
> > Thanks Dan!
> >
> > The template trick didn't work but after some playing around, I got
> > #arraymaptemplate to work. Here's the basic code for anyone who needs
> > it:
> >
> > In the template definition:
> > {{#tag:gallery|
> > {{#arraymaptemplate:{{{Photos|}}}|GalleryNewline|,|}}
> > }}
> >
> > In Template:GalleryNewline
> > (a blank line goes here)
> > File:{{{1}}}
> >
> > I tried some more routine and obvious tricks in the template but this
> > is the only I could get to work.
> >
> > Be careful. Every time you edit Template:GalleryNewline, it will
> > remove that blank line. I think there's a way to prevent that, but
> > this works for now.
> >
> > Again thanks to everyone.
>
> That's awesome!
>
> You might like to add this to the collection of tips here:
>
> http://smw.referata.com/wiki/Special:BrowseData/Tips
>
>
> Just click 'Add a tip' in the box on the left.
>
>
> All the best,
> Dan.
>
>
> --
> ... people generally show up expecting and looking for social norms.
> That's just how humans are built. In any group unified by a common
> endeavor, people who join instinctively search for behaviors that will
> mark them as part of the group. The goal of setting precedents early
> is to make those "in-group" behaviors be ones that are useful to the
> project; for once established, they will be largely self-perpetuating.
>   ~ http://producingoss.com/en/setting-tone.html
>
> > On May 10, 10:37 am, Dan Bolser <[email protected]> wrote:
> >> One of the nice things about DPL is that it respects "\n". Although
> >> this can be a pain for debugging (the wiki code can get complex) its a
> >> nice feature to have. I don't know how technically difficult it would
> >> be to implement in #ask: and/or #arraymap.
> >>
> >> The alternative is to stick newlines in templates with something like
> >>
> >> Template:n
> >> <includeonly>
> >> </includeonly>
> >>
> >> The <includeonly> tags should perform the same (guaranteed?) function
> >> as the <nowiki> tags in the previous example.
> >>
> >> I think you should then be able to say something like ...
> >>
> >> {{#tag:gallery|
> >>   {{#arraymap:{{{Photos|}}}|,|x|Image:x| {{n}} }}
> >>
> >> }}
> >>
> >> If that doesn't work, I'm sure #arraymaptemplate should.
> >>
> >> Dan.
> >>
> >> 2009/5/10 tosfos <[email protected]>:
> >>
> >>
> >>
> >> > I thought this would work too but for some reason it's no go. Unless
> >> > I'm messing something up. Thanks!
> >>
> >> > On May 9, 11:55 pm, Daniel Friesen <[email protected]> wrote:
> >> >> {{#tag:gallery|
> >> >> {{#arraymap:{{{Photos|}}}|,|x|Image:x|<nowiki>
> >> >> </nowiki>}}
> >>
> >> >> }}
> >>
> >> >> ~Daniel Friesen (Dantman, Nadir-Seen-Fire)
> >>
> >> >> tosfos wrote:
> >> >> > There is an old thread about getting the <gallery> tag to work with
> >> >> > SF:
> >> >> >
> http://groups.google.com/group/semantic-forms/browse_thread/thread/6c...
> >>
> >> >> > Reviving an old topic, there may be some possibilities here for
> anyone
> >> >> > who still needs it. I'm one of them. :)
> >>
> >> >> > There is now a #tag: parser function which could help. It would
> >> >> > work something like this:
> >>
> >> >> > {{#tag:gallery|
> >> >> > Image:Example.jpg
> >> >> > Image:Example2.jpg
> >> >> > Image:Example3.jpg
> >> >> > Image:Example4.jpg
> >> >> > Image:Example5.jpg
> >> >> > }}
> >>
> >> >> > Translating into Semantic Forms, the template definition would look
> >> >> > like this:
> >> >> > {{#tag:gallery|
> >> >> > {{#arraymap:{{{Photos|}}}|,|x|Image:x}}
> >> >> > }}
> >>
> >> >> > I haven't tested the above code but it should be the right idea.
> The
> >> >> > only reason why this does not work is because I can't get #arraymap
> to
> >> >> > delimit with a newline character in order to match the gallery
> tag's
> >> >> > syntax. Any ideas for this would be greatly appreciated.
> >>
> >> >> > Thanks!
> > >
> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Semantic Forms" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/semantic-forms?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to