I tried this - but it's not working - maybe you can tweak it to work?
<script>
var out="|";
var txt=store.getTiddlerText("CoverListe","Get links from the
Coverlist");
var items=txt.split("\n----\n");
if (txt.length)
items=items.concat(txt.split(txt.indexOf('\n----\n')!=-1?'\n----
\n':'\n'));
if (!items[1]) items=txt.split("\n");
var i = 0;
for (i=0; i<items.length; i++) {
if (i>0 && (i%5)==0 ) out += "\n| "; // start a new row
out += " [img["+items[i]+"]["+items[i]+"]] |" ; // add item to row
}
if ((i%5)!=0) out += "|"; // start a new row
return out;
</script>
Regards Måns Mårtensson
On 10 Mar., 08:05, Måns <[email protected]> wrote:
> Hmm
> I've broken the table when I changed my use of the hr-seperated list,
> to make it "fit the standards" of Eric's
> ListBoxPlugin.http://www.tiddlytools.com/#ListboxPlugin.
>
> Now a listitem consists of a title(to be shown in a select from
> dropdown list) (equals)= fieldvalue newline: tooltip......
> Ex:
> Avatar=http://image.png
> this is an image I found at flickr.com
>
> I need the script only to fetch the data on the first line just after
> the equalsign....
> However this is out of my reach...
>
> I've tried to look at the ListBoxPlugin code to see if there is some
> code which might help me - and I believe some of this is what I need
> to implement in the script Mark made for me:
> { // param is item value or 'label=value'
> var parts=p.split("=");
> var label=parts[0]; var
> v=parts[1]?parts[1]:parts[0];
> items.push(label+"="+v);
> }
>
> or sth with this line: listtxt=this.getWikifiedData(listtxt);
> if (listtxt.length)
> var
> items=listtxt.split(listtxt.indexOf('\n----\n')!=-1?'\n----
> \n':'\n');
>
> If there is a simple solution for my problem - please give me a
> hint :-)
>
> Regards Måns Mårtensson
>
> On 9 Mar., 08:17, Måns <[email protected]> wrote:
>
>
>
> > Hi Mark
>
> > > This seemed to work
>
> > Indeed it did :-)
>
> > Thanks a lot!!
> > I've even managed to make it spit out iframes!
> > See it working here:http://maans.bplaced.net/TiddlyHome/kartotek/#Covers
> > and with iframes:http://maans.bplaced.net/TiddlyHome/kartotek/#Medier
>
> > Thanks for helping me out again Mark. I apreciate it very much!
>
> > Regards Måns Mårtensson
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" 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/tiddlywiki?hl=en.