\define searchInField(field, for)
<$list filter="[!is[shadow]!is[system]field:$field$/$for$/]">
<$link><$view field="title"/></$link>
</$list>
\end
<$list filter="[!is[shadow]!is[system]fields[]]" variable="fieldname">
Searching in field: <<fieldname>>
<$macrocall $name="searchInField" field=<<fieldname>> for={{$:/temp/search}}/>
</$list>
\define searchInField(field, for)
<$list filter="[!is[shadow]!is[system]field:$field$/$for$/]">
<$link><$view field="title"/></$link>
<
/$list>
\end
<$reveal state="$:/temp/search" type="nomatch" text="">
<$list filter="[!is[shadow]!is[system]fields[]]" variable="fieldname">
Searching in field: <<fieldname>>
<$macrocall $name="
searchInField" field=<<fieldname>> for={{$:/temp/search}}/>
</$list>
</$reveal>
\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[]]" variable="fieldname">
<$macrocall $name="searchInField" field=<<fieldname>> for={{$:/temp/advancedsearch}}/>
</$list>
</$reveal>
--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.
Hello, StephanDo I need to name this tiddler in some special way or tag it with some special tag to make it work?
\define searchInField(field, for)
<$list filter="[!is[shadow]!is[system]field:$field$/$for$/]">
<$link><$view field="title"/></$link>
<
/$list>
\end
<$reveal state="$:/temp/search" type="nomatch" text="">
<$list filter="[!is[shadow]!is[system]fields[]]" variable="fieldname">
Searching in field: <<fieldname>>
<$macrocall $name="
searchInField" field=<<fieldname>> for={{$:/temp/search}}/>
</$list>
</$reveal>
\define searchInField(field, for)
<$list filter="[!is[shadow]!is[system]field:$field$/$for$/]">
<$link><$view field="title"/></$link>
<
/$list>
\end
<$edit-text tiddler="$:/temp/advancedsearch" type="search" tag="input"/> <$select field="fieldname" tiddler="$:/temp/advancedsearch">
<option value="Any">Any</option>
<$list filter="[!is[shadow]!is[system]fields[]sort[]]" variable="fieldname">
<option value=<<fieldname>>><<fieldname>></option>
</$list>
</$select>
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
<$reveal state="$:/temp/advancedsearch!!fieldname" type="match" text="Any">
<$list filter="[!is[shadow]!is[system]fields[]]" variable="fieldname">
Searching in field: <<fieldname>>
<$macrocall $name="searchInField" field=<<fieldname>> for={{$:/temp/advancedsearch}}/>
</$list>
</$reveal>
<$reveal state="$:/temp/advancedsearch!!fieldname" type="nomatch" text="Any">
Searching in field: {{$:/temp/advancedsearch!!fieldname}}
<$macrocall $name="searchInField" field={{$:/temp/advancedsearch!!fieldname}} for={{$:/temp/advancedsearch}}/>
</$reveal>
</$reveal>
Best wishes, Tobias.
--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.
Hi Tobias
> Smells like a core feature to me.
However, this implementation uses the deprecated regexp operand syntax. We should use the new `regexp` filter operator instead if possible.
\define searchInField(field, for, ignore)
<$list filter="[!is[shadow]!is[system]regexp:$field$[$for$$ignore$]]">
<$link><$view field="title"/></$link>
</$list>
\end
<$edit-text tiddler="$:/temp/advancedsearch" type="search" tag="input"/> <$select field="fieldname" tiddler="$:/temp/advancedsearch">
<option value="Any">Any</option>
<$list filter="[!is[shadow]!is[system]fields[]sort[]]" variable="fieldname
">
<option value=<<fieldname>>><<fieldname>></option>
</$list>
</$select> <$checkbox field="ignore" tiddler="$:/temp/advancedsearch" checked="(?i)"> ignore case</$checkbox>
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
<$reveal state="$:/temp/advancedsearch!!fieldname" type="match" text="Any">
<$list filter="[!is[shadow]!is[system]fields[]]" variable="fieldname">
Searching in field: <<fieldname>>
<$macrocall $name="searchInField" field=<<fieldname>> for={{$:/temp/advancedsearch}} ignore={{$:/temp/advancedsearch!!ignore}}/>
</$list>
</$reveal>
<$reveal state="$:/temp/advancedsearch!!fieldname" type="nomatch" text="Any">
Searching in field: {{$:/temp/advancedsearch!!fieldname}}
<$macrocall $name="searchInField" field={{$:/temp/advancedsearch!!fieldname}} for={{$:/temp/advancedsearch}} ignore={{$:/temp/advancedsearch!!ignore}}/>
</$reveal>
</$reveal>
It's possible. It's also possible to ignore case:
\define searchInField(field, for, ignore)
<$list filter="[!is[shadow]!is[system]regexp:$field$[$for$$ignore$]]">
<$link><$view field="title"/></$link>
</$list>
\end
<$edit-text tiddler="$:/temp/advancedsearch" type="search" tag="input"/> <$select field="fieldname" tiddler="$:/temp/advancedsearch">
<option value="Any">Any</option>
<$list filter="[!is[shadow]!is[system]fields[]sort[]]" variable="fieldname">
<option value=<<fieldname>>><<fieldname>></option>
</$list>
</$select> <$checkbox field="ignore" tiddler="$:/temp/advancedsearch" checked="(?i)"> ignore case</$checkbox>
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
<$reveal state="$:/temp/advancedsearch!!fieldname" type="match" text="Any">
<$list filter="[!is[shadow]!is[system]fields[]]" variable="fieldname">
Searching in field: <<fieldname>>
<$macrocall $name="searchInField" field=<<fieldname>> for={{$:/temp/advancedsearch}} ignore={{$:/temp/advancedsearch!!ignore}}/>
</$list>
</$reveal>
<$reveal state="$:/temp/advancedsearch!!fieldname" type="nomatch" text="Any">
Searching in field: {{$:/temp/advancedsearch!!fieldname}}
<$macrocall $name="searchInField" field={{$:/temp/advancedsearch!!fieldname}} for={{$:/temp/advancedsearch}} ignore={{$:/temp/advancedsearch!!ignore}}/>
</$reveal>
</$reveal>
we should use the new `regexp` filter operator instead if possible.
It's possible. It's also possible to ignore case:
Hi Stephan,
This is very useful. I slightly modified it and added it here...
\define searchResultList()//<small>{{$:/language/Search/Matches/Title}}</small>//
<$list filter="[!is[system]search:title{$(searchTiddler)$}sort[title]limit[250]]" template="$:/core/ui/ListItemTemplate"/>
//<small>{{$:/language/Search/Matches/All}}</small>//
<$list filter="[!is[system]search:*{$(searchTiddler)$}sort[title]limit[250]]" template="$:/core/ui/ListItemTemplate"/>
\end<<searchResultList>>
Regards
Tony
<div class="tc-menu-list-item"><$link to={{!!title}}>
<$view field="title"/></$link>
</div>