Ok I managed to get the advanced search bar on top myself. Now I only want 
to combine my search results as described above. My Code now looks like 
this:

\define searchInField(field, for)

<$list filter="[!is[shadow]!is[system]field:$field$/$for$/]">$field$: 
<ul><li><$link><$view field="title"/></$link> </li></ul></$list>
\end

<div class="tc-advanced-search">
<$macrocall $name="tabs" 
tabsList="[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch]!has[draft.of]]" 
default="$:/core/ui/AdvancedSearch/System" actions="""<$action-setfield 
$tiddler="$:/state/advancedsearch/currentTab" text=<<currentTab>>/>""" 
explicitState="$:/state/tab--1498284803"/>
</div>

<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">

<$list filter="[!is[shadow]!is[system]fields[]] -title -text -tags" 
variable="fieldname">
<$macrocall $name="searchInField" field=<<fieldname>> 
for={{$:/temp/advancedsearch}}/> 
</$list>
</$reveal>

Thanks if someone can help me.

[email protected] schrieb am Donnerstag, 20. Mai 2021 um 13:27:43 
UTC+2:

> Hi TiddlyCommunity,
> I came up with a little bit of code myself. I found it from a old post and 
> it basicly uses the Standard Advanced Search to find all user fields that 
> have the searched word and link the Tiddlers. I copied the Advanced Search 
> core Tiddler to have everything on one Tiddler, but the problem is it only 
> works when i put it after the fieldfilter. My Code looks like this:
>
> \define searchInField(field, for)
> <$list filter="[!is[shadow]!is[system]field:$field$/$for$/]">$field$: 
> <ul><li><$link><$view field="title"/></$link> </li></ul></$list>
> \end
> <$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
>
> <$list filter="[!is[shadow]!is[system]fields[]] -title -text -tags" 
> variable="fieldname">
> <$macrocall $name="searchInField" field=<<fieldname>> 
> for={{$:/temp/advancedsearch}}/> 
> </$list>
> </$reveal>
>
> <div class="tc-advanced-search">
> <$macrocall $name="tabs" 
> tabsList="[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch]!has[draft.of]]" 
> default="$:/core/ui/AdvancedSearch/System" actions="""<$action-setfield 
> $tiddler="$:/state/advancedsearch/currentTab" text=<<currentTab>>/>""" 
> explicitState="$:/state/tab--1498284803"/>
> </div>
>  
> I want to put the Advanced Searchbar first. Its probably not that hard but 
> i fail at it anyways. So how do i get it on top of the filter?
> And my second question is, how do i modify the fieldfilter list. Currently 
> the filter displays the matching fields and the linked Tiddler one by one. 
> Is there a way to combine them into one list for each user field? For 
> example i combine all Linked Tiddler with the user field "field1" into a 
> list and all user field "field2" into one list. Because right now it 
> displays them separate. So when i search for "person" it looks like this:
>
> field1:
>
>    - Tiddler1
>
> field1:
>
>    - Tiddler2
>
> field2:
>
>    - Tiddler3
>
> field2:
>
>    - Tiddler4
>
> But it would look better if it lists them as:
>
> field1:
>
>    - Tiddler 1
>    - Tiddler 2
>
> field2:
>
>    - Tiddler 3
>    - Tiddler 4
>
> The code itself does exactly what i want but its looks not that nice. I 
> would appreciate an suggestion. Thanks
>

-- 
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/ac60d6c6-5487-4f31-8898-3681095505a7n%40googlegroups.com.

Reply via email to