Auto Complete links with caption?

Hello.
Is there any plugin or any way to ensure that when using ctrol+L to enter a link, not only the tiddlers that begin with the requested name appear, but also the tiddlers that have the same name in the caption field?
I’ve been searching but haven’t found anything about it and it seems like an interesting utility.

Thank you.

@Xabrina if you use the instructions Customising search Results a new tab appears in;

  • The Standard search dropdown
  • Advanced Search > Standard tab
  • And ctrl+L to enter a link <<== what you are after!

This example provides a search caption only tab Custom search captions.json (545 Bytes)

  • If you replace caption with * is will search all fields.

And this title and caption only, Custom search title_caption.json (601 Bytes)

The above also search shadows and system tiddlers.

1 Like

Hi, @TW_Tones.

Thank you for the new queries you have provided me, they will help me a lot.

I didn’t know that the queries could be modified, the truth is that there is so much information that I get lost a lot…

Could the tiddler title be included right next to the caption field in the results?

For example: James (characters/movies/James)
Where James would be the name of the caption field and characters/movies/James would be the name of the tiddler.

Have a nice day.

Of course you can, I will look at it in my tomorrow. Alternatively you could mouse over the caption and display the title?

1 Like

Thanks Tony.

It is true that by hovering over the results you can see their name, but if I have many results it is not very efficient or visually as fast as if you see the title next to the caption.

Greetings.

Add the following view-widget code <$view field=caption/> (<$view field=title/>) into the list-widget as shown below

\define searchResults()
<$set name="resultCount" value="""<$count filter="[all[shadows+tiddlers]search:title,caption{$(searchTiddler)$}]"/>""">
Search Captions only<br>
{{$:/language/Search/Matches}}

</$set>
<$list filter="[all[shadows+tiddlers]search:title,caption{$(searchTiddler)$}] +[sort[caption]]">

<$link to=<<currentTiddler>> ><$view field=caption/> (<$view field=title/>)</$link>

</$list>
\end
<<searchResults>> 
1 Like

Hello @pmario.

Thanks for your instructions. I have tried it and I have a problem, I get the results exactly as I wanted but it doesn’t allow me to select them.
I have been trying to change the color of the caption so that it stands out from the tiddler title and is more visual when searching for the results, and at first I thought it was the fault of the code I was putting in. But once I removed it the problem persisted.

All the best.

uups. Sorry. The whole thing needs to be covered in a link-widget.

<$link to=<<currentTiddler>> ><$view field=caption/> (<$view field=title/>)</$link>

1 Like

Hi, @pmario and @TW_Tones.

In the end, with your instructions, I managed to do it the way I wanted.

I have made some small modifications that basically consist of putting the title first and then the caption, changing the color and putting the caption results in italics.
I put it below in case it is useful to someone.

\define searchResults()
<$set name="resultCount" value="""<$count filter="[all[shadows+tiddlers]search:title,caption{$(searchTiddler)$}]"/>""">
Search Captions only<br>
{{$:/language/Search/Matches}}

</$set>
<$list filter="[all[shadows+tiddlers]search:title,caption{$(searchTiddler)$}] +[sort[caption]]">

<$link to=<<currentTiddler>> ><$view field=title/> <span style="color: blue"> //<$view field=caption/>//</span></$link>

</$list>
\end
<<searchResults>> 

We put this code in a tiddler with the title: Custom search title/caption

and with the label: $:/tags/SearchResults

Then we add the fields: caption with the content Title/Caption and the source-tiddler field with the content Caption search

Regards, and thank you very much.