What I have in the fields that I want to split are an author and quote. For
example, in I have a field that looks like this:
```
entry (0): author name|Lorem ipsum dolor sit amet, consectetur adipiscing
elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Viverra ipsum nunc aliquet bibendum enim facilisis gravida.
entry (1): author name|Massa sed elementum tempus egestas. Vitae turpis
massa sed elementum tempus egestas.
```
It's the author and the quote that I am trying to split. The HTML should
look like this:
```
\quote 1
<div class='quote'>Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Viverra
ipsum nunc aliquet bibendum enim facilisis gravida.</div>
<div class='author'>author name</div>
\quote 2
<div class='quote'>Massa sed elementum tempus egestas. Vitae turpis massa
sed elementum tempus egestas.</div>
<div class='author'>author name</div>
```
The text I am trying to render:
```
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Viverra ipsum nunc
aliquet bibendum enim facilisis gravida.
~ author name
Massa sed elementum tempus egestas. Vitae turpis massa sed elementum tempus
egestas.
~ author name
\or if no such field exists, I would like to render this:
No quotes available.
```
Some tiddlers will have multiple quotes, so keeping the author and quote in
the same field to keep things neat would be prefered.
Thanks.
On Monday, April 4, 2022 at 3:23:48 PM UTC-5 PMario wrote:
> Hi,
> Wikitext is highly efficient if you want to create text output, it's _not_
> a general purpose programming language.
>
> Filters are there to create selections of tiddlers. eg:
> "[tag[test]has[my-field]]", which will list all tiddlers that are tagged:
> "test" and have a field: my-field. .. In this case it doesn't matter if the
> field value is empty or not. ... "has" just tells us that the field exists.
>
> I don't understand, why you want to split field values. It only makes
> everything more complicated, as you already found out.
>
> It's 22:22 here in my time zone, so I don't want to look at your "code"
> and guess, what the end result should look like.
>
> For me it would be easier, if you would tell me in plain text, *what* you
> want to achieve and not how you want to achieve it.
>
> - How does your tiddler content look like
> - How does the field value looks like?
> - Why do you want to split it?
> - How should the end-result look like ... In plain text.
>
> -mario
>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/57f1c04b-a7fc-4eb2-9bb4-3cf28fb3786en%40googlegroups.com.