Bonsoir Jean-Pierre, Hi Tones,
I'm playing with a simple phone book / member organisation tool.
Here the last share version : https://tw5.xyz/Annuaire/annuaire.html
1/ I'm wondering If I could put some of your code to create an index, like
you idea with first letter from tiddler, that would be great ; I've try a
but failed..
2/ I've a second wish, to auto-complete initials from concatenate 2 fields
values (like SN for Sylvain Naudin), you will see avatar what I'm mean.
If you have some idea's to achieve this, I'll be happy :)
Cheers,
Sylvain
Le jeudi 19 novembre 2020 à 00:06:24 UTC+1, TW Tones a écrit :
> Jean-Pierre,
>
> Thanks for sharing back. Just remember {{<<letter>>}} is overloading the
> shortcut syntax for transcludes, when we use shortcuts they are typically
> less featured and we need to resort to the long forms such as the
> transclude widget. However as you become experienced with filters the
> triple curly braces "filtered transcludes", is a powerful method. See the
> reference
> <https://anthonymuscio.github.io/#%E2%9D%BB%20Filtered%20transclusions> I
> am building.
>
> the thing with a filtered transclude {{{ filter }}} is and field tiddler
> or content can be used to generate the result of the filter. eg
> {{{ [<letter>get[text]] }}} would retrieve the text of the letter tiddler,
> Here we have access in the filter to control the result, and triple curly
> bracces can provide values to parameters in widgets param={{{ filter }}}
> including $macrocall to access macros.
>
> Regards
> Tones
>
> On Thursday, 19 November 2020 at 00:19:38 UTC+11 [email protected]
> wrote:
>
>> As a final reply to this post, I can now show you a working solution,
>> complete within my project: elaborating a glossary entry for French.
>>
>> \define all-initials()
>> <$list filter="[tag[glossaire]]">
>> <$set name=1st value={{{ [all[current]split[]first[]] }}}>
>> <<1st>>
>> </$set>
>> </$list>
>> \end
>>
>> \define glossaryList()
>> <$wikify name="all-letters" text=<<all-initials>>>
>> <$list
>> filter="[<all-letters>uppercase[]split[É]join[E]split[]each:value[]!is[missing]]"
>>
>> variable="letter">
>> <$link to=<<letter>>/>
>> </$list>
>>
>> <$list
>> filter="[<all-letters>uppercase[]split[É]join[E]split[]each:value[]!is[missing]]"
>>
>> variable="letter">
>> <h3><$link to=<<letter>>/></h3>
>> <$set name="entries" filter="[<letter>addprefix[{{]addsuffix[}}]]">
>> <<entries>>
>> </$set>
>> </$list>
>> </$wikify>
>> \end
>>
>> A bit of conundrum yet: I have been required to duplicated the $list
>> filter="[<all-letters>uppercase[]split[É]join[E]split[]each:value[]!is[missing]]"
>>
>> variable="letter"> because I have not been able to use its results one way
>> or another (wikify, variable... no way).
>>
>> But the things that really was strange is that I could not transclude the
>> tidler of any given letter (like "A" or "M") with
>>
>> <$transclude tiddler=<<letter>>/>
>>
>> because its transclude all the letters instead (and not even that,
>> because the E was missing entries beginning by "é" which the real "E"
>> tiddler has). And the only working way to generate the {{<<letter>>}}
>> syntax that would work was through the filter of a variable. How strange!
>>
>> This kind of quirks realling make things much slower than what you would
>> think they have too.
>>
>> Le dimanche 1 novembre 2020 à 14:34:56 UTC+1, Eric Shulman a écrit :
>>
>>> On Tuesday, October 27, 2020 at 6:53:17 PM UTC-7, Jean-Pierre Rivière
>>> wrote:
>>>>
>>>> Other than a question of taste, or of giving a meaningful name to a
>>>> complex filter preceding the get operator in my example, it seems that
>>>> subfilter has no other intterest, isn't it?
>>>
>>>
>>> As I already noted in a previous reply (
>>> https://groups.google.com/d/msg/tiddlywiki/2P6G5NtUuWA/A3Be4gWcBgAJ)
>>>
>>> ... if you wanted to have different filters based on a field value, you
>>>> could write:
>>>> <$set name="F" filter="[{!!setting}match[somevalue]]"
>>>> value="[somefilter]" emptyValue="[someotherfilter]">
>>>> <$list filter="[subfilter<F>]"/>
>>>> </$set>
>>>> Note in the above example, I've used the "conditional variable
>>>> assignment" form of $set (see https://tiddlywiki.com/#SetWidget)
>>>
>>>
>>> -e
>>>
>>
--
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/581a560c-3b04-4022-b8d1-cbccccc5ba07n%40googlegroups.com.