Hello again Mark,
So I have made some progress building my search function. This is what I
have so far...
<$list filter="[[$:/temp/search]] +[minlength[3]]">
<<list-links "[has[Intelligence]search:intelligence{$:/temp/search}]">>
</$list>
<$button>
<$action-createtiddler $basetitle="Homemade Button"
tags="$:/tags/PageControls" text={{$:/state/new-button-caption}}/>
Search
</$button> <$edit-text tiddler="$:/state/new-button-caption" tag="input"
default=""/>
<div class="tc-table-of-contents">
<<toc-selective-expandable 'INDEX' sort[title]>>
And this is how it renders. Its pretty much exactly what I want. Problem
is I can't figure out how to make it actually search.
[image: search capture.jpg]
The search field is on the index page, which is what I want. But it
doesn't seem to do any actual searching. just prints the word I type in on
the side of the screen.
On Tuesday, 2 October 2018 21:27:20 UTC-3, Mark S. wrote:
>
> Here's a quick and dirty way to set up a search by one attribute. It
> leverages the existing search field (which is in $:/temp/search) and the
> list-links macro.
>
> Make a tiddler, say "Search-Intelligence". Create a "caption" field with a
> short title (say "S-Intel") and tag the tiddler with $:/tags/SideBar .
>
> In the contents put:
>
> <$list filter="[[$:/temp/search]] +[minlength[3]]">
> <<list-links "[has[intelligence]search:intelligence{$:/temp/search}]">>
> </$list>
>
> The outer list just makes sure that no searching starts until at least 3
> characters have been typed (you'll want to change that for numerical
> searches, of course). The list-links macro searches in the "intelligence"
> field, using the contents of the main search box. I used "search" and not
> find because I'm pretty sure that "find" wants exact matches, whereas you
> might want partial matches in this instance.
>
> That's it! Save the tiddler and now a new tab will appear in the sidebar,
> S-Intel. Open it. Type "aver" (or Average) and assuming some of your
> entries have "Average" in the field they should be listed.
>
> Always make backups before you try any of this, in case you accidentally
> create an infinite recursive loop or something.
>
> -- Mark
>
> On Tuesday, October 2, 2018 at 1:13:55 PM UTC-7, PWL wrote:
>>
>> Great! Thank you. Okay next step... I figured out how to use the filters
>> in the advance search ( I know, no big feat) But they worked the way I
>> wanted! So now I just have to figure out how to put a search function in
>> that doesn't require me to type [field:intelligence[average]] into the
>> advanced search every time I want to search something. I was thinking a
>> search button at the top of the index page I have or another tab on the
>> side bar that has search options, something simple. I haven't been able to
>> find anything like that. I even tried copying the code from the site and
>> tweaking it. No luck.
>>
>> On Monday, 1 October 2018 21:47:48 UTC-3, Mark S. wrote:
>>>
>>> Edit the tiddler and scroll to the bottom of the tiddler (e.g. "Allin").
>>> At the bottom you'll see:
>>>
>>> "Add a new field"
>>>
>>> Fill the box next to that with the name of the field you want (e.g.
>>> "intelligence") and then the field next to that with the value (e.g. "10")
>>> and then click on the "Add" button. Repeat for each field.
>>>
>>> Don't use spaces in field names. For future sanity, use all lower case
>>> because field operators are case sensitive. I tend to eliminate all
>>> punctuation except _ and - .
>>>
>>> Once you have made a field, the next time you add the same field to a
>>> new tiddler you will see a list of existing fields from which to select.
>>> This will help prevent spelling inconsistencies as you work (plus save a
>>> little typing time.)
>>>
>>> -- Mark
>>>
>>> On Monday, October 1, 2018 at 5:16:28 PM UTC-7, PWL wrote:
>>>>
>>>> How about this? I will start with the absolute minimum.... I want to
>>>> make 3 items in my list searchable.... Climate / Terrain: [alpha only],
>>>> Intelligence: [alpha numeric] and Hit Dice: [alpha numeric] I think it
>>>> has been determined that fields are the best way to go with this. How do
>>>> I
>>>> make a field?
>>>>
>>>> On Sunday, 30 September 2018 11:38:23 UTC-3, PWL wrote:
>>>>>
>>>>> Hello all,
>>>>>
>>>>> I have recently started using Tiddly wiki to build a knowledge
>>>>> database and I am having difficulty figuring a few things out. I am
>>>>> hoping
>>>>> somebody can help.
>>>>>
>>>>> Like I said, I have run into several things that I can no figure out
>>>>> so I will start with what I figure will probably be the easiest problem.
>>>>>
>>>>> This wiki is going to be huge when it is done (4500+) entries. Each
>>>>> entry has a list of 14 stats that need to be displayed as a table. I
>>>>> found
>>>>> how to build tables, the work perfectly, and I like the look.
>>>>> But I have found that it is rather labour intensive to do this every
>>>>> time I make a new entry. Is there a macro, or some code, or anything
>>>>> that
>>>>> can make this easier for me?
>>>>>
>>>>
--
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/8481ca66-da31-48ff-bb13-10b0a73da59f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.