On 7 Mar 2009, at 7:33 PM, Jonas Zimmermann wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > Am 07.03.2009 um 18:01 schrieb Christiaan Hofman: > >>> But that's just >>> minor. I wanted to get a link to the file with abbreviated path >>> (just >>> as in the standard template), but using the linkedText key instead. >>> However, while the key itself works, it doesn't take any modifiers >>> (output is blank). >> >> I think you misunderstand linkedText: it gives an attributed string >> with a link attribute to link to the URL or file, useful for rich >> text >> templates. As it is an attributed string, it won't take string >> modifiers. > > Ah, OK, good to know... > >> >>> I can modify the absoluteString key, however, that >>> also doesn't give a tilde-abbreviated path. >> >> absoluteString is the URL string, and >> stringByAbbreviatingWithTildeInPath expects a path. > > right, I haven't seen the "Local file, Remote URL" section in the > help... so I mixed it all up. >> >> What you miss is that you need to get path instead of linkedText. If >> you still want a link, you should add linkedText at the end. < >> $path.stringByAbbreviatingWithTildeInPath.linkedText/> >> >> Also, linkedFiles are /linked file/ objects, not paths or URLs. BD >> applies a trick to make keys like absoluteString and >> richTextSkimNotes >> work, but it's more correct to add a url key in the path. However >> @nonEmpty won't work, because linked files are never 'empty' (the url >> or path can be 'empty'). So either add a condition tag, or perhaps >> better use the following (which also addresses the above comment): >> >> <$localfiles.u...@nonempty> >> <$path.stringByAbbreviatingWithTildeInPath.linkedText/> >> <$absoluteString/> >> <$richTextSkimNotes?> >> Notes: >> <$richTextSkimNotes/> >> </$richTextSkimNotes?> >> </$localfiles.u...@nonempty> > > this, however, does not work for me (I just get blank lines).
Sorry, the "url" key should be uppercase as in the help (I just typed it in mail). > When I > change it to > > <$localFiles> > <$path.stringByAbbreviatingWithTildeInPath.linkedText/> > </$localFiles> > > it works (I've left out the other stuff in the loop). Makes sense, > since path is a property of a localFile, right? And I think I > misunderstood the @nonEmpty modifier... I misconstrued it as a > condition on the non-emptyness of the collection, i.e. existence of at > least 1 item. No, it's a filter to filter out null items, mostly introduced for field collections like allFields. > I guess if there's no localFile, the loop won't be > executed. Stupid me... > That's right. > Thanks very much, > > Jonas Christiaan ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Bibdesk-users mailing list Bibdesk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-users