[TW5] $:/core/ui/ListItemTemplate : several links per line no longer possible with new result display ?

95 views
Skip to first unread message

Jean-Charles

unread,
Mar 10, 2016, 3:16:51 PM3/10/16
to TiddlyWiki
I am using a custom $:/core/ui/ListItemTemplate to display specific tiddlers in the result list. The allows me to display the result with extra icons linking to other locations (the tiddlers refer to external files, and the link allow direct access).

I upgraded to 5.1.11 and saw that the search changed, and that it "split" my links on several lines. Is there a way to avoid the new behavior ? Is there any clever suggestion to maintain my functionality (I am not sure I can make results appear differently in both search result)...





PMario

unread,
Mar 11, 2016, 7:00:41 AM3/11/16
to TiddlyWiki
Hi,
Have a look, what's different. Make a copy of the old content and use it as your custom ListTemplate. ...
Just don't use $:/core/ui as a prefix, because this may be confusing in the future. .> You may use $:/<whatEverYouWant>/ListItemTemplate

-m

Jean-Charles

unread,
Mar 12, 2016, 8:43:38 AM3/12/16
to TiddlyWiki


Le vendredi 11 mars 2016 13:00:41 UTC+1, PMario a écrit :
Have a look, what's different. Make a copy of the old content and use it as your custom ListTemplate. ...

A look to what ? My template is working, it's just that the display of search results is now done differently that break multi-links per line...
 
Just don't use $:/core/ui as a prefix, because this may be confusing in the future. .> You may use $:/<whatEverYouWant>/ListItemTemplate

I do not need to change $:/core/ui/DefaultSearchResultList, which is fine and uses $:/core/ui/ListItemTemplate as a template. I cannot change the name.

My issue is more about the new display of search results in the ui. I'll try to find what commit it was (but if someone has it in mind or can narrow the search, it would help).

Jc

BJ

unread,
Mar 12, 2016, 11:23:58 AM3/12/16
to TiddlyWiki

Hi Jean-Charles,
this type of behavior is most likely caused by your template having blank lines between you icons, which sometimes causes tw to (incorrectly) rap things in paragraph tags.

all the best

BJ

Jean-Charles

unread,
Mar 12, 2016, 12:29:52 PM3/12/16
to TiddlyWiki
Hi BJ, thanks for pointing this. From what I see in the resulting code, there is no <p> tagging involved. Just the fact that the new 'search box results' uses a box that somehow enforces one single <a> per line (which seems a consistent when there is only one link per result).

As I want to have more than one clickable link per entry result, the box format is incompatible with what I want to achieve.

I'll rollback to the 5.1.9 $:/core/ui/SideBarLists code where the boxed results was not used.

Thanks to all of you for your support.

Jc

BJ

unread,
Mar 12, 2016, 3:59:32 PM3/12/16
to TiddlyWiki
the links are being 'forced' to act as blocks by the css - you could force them back to inline in your template, eg

<$link to={{!!title}} style="display:inline">

Jean-Charles

unread,
Mar 13, 2016, 7:48:02 AM3/13/16
to TiddlyWiki


Le samedi 12 mars 2016 21:59:32 UTC+1, BJ a écrit :
the links are being 'forced' to act as blocks by the css - you could force them back to inline in your template, eg

<$link to={{!!title}} style="display:inline">

You found it ! The issue had to do with css and links as blocks; I'll try to propose something with the block mode for the tc-menu-list-item rather than the contained links... 

Thank you BJ !
Reply all
Reply to author
Forward
0 new messages