Loading...
 
Features / Usability

Features / Usability


Do we have Tracker item backlink for wiki page?

posts: 8633 Israel

Hello,

On a Tiki24 I have wiki pages and trackeritems.

On a wiki page, I mention a trackeritem "item12345".

I would like to have a way to list on the same page all other pages that have a link to this item.

I have a solution with a plugin list but even if I create a plugin alias it is a kind of "manual" operation (I have to type the object_id that should be filtered).

  1. Is there a feature that does that automatically ? (backlink something ?)
  2. Would it be possible to search (indexing) from within a plugin footnote (yes 🤭)
Copy to clipboard
{FOOTNOTE()}See {mentionitem itemId="15048"}{FOOTNOTE}
posts: 126886 United Kingdom

Good question @Bernard Sfez / Tiki Specialist - i don't think there's a feature for that, but i think you can search within the "raw" markup of wiki pages - hmm, there'a field wiki_content which i think you can use in the returned info (in a tpl) but i can't seem to get any results searching in it, like this should work i reckon, but doesn't...

Copy to clipboard
{LIST()} {filter type="wiki page"} {filter field="wiki_contents" content="custom"} {LIST}

Sorry eek

posts: 8633 Israel
Jonny Bradley wrote:

Good question @Bernard Sfez / Tiki Specialist - i don't think there's a feature for that, but i think you can search within the "raw" markup of wiki pages - hmm, there'a field wiki_content which i think you can use in the returned info (in a tpl) but i can't seem to get any results searching in it, like this should work i reckon, but doesn't...

Copy to clipboard
{LIST()} {filter type="wiki page"} {filter field="wiki_contents" content="custom"} {LIST}

Sorry eek


Thank you Jonny for pointing this field I had no idea it exists.

But I couldn't get expected results neither... So it doesn't seems to work (ElasticSearch). 🤷🏻‍♂️

Field wiki_contents does not exist in the current index

A similar solution using a more "open" filter work in this case as it is 5 numbers items ID (quite specific)

Copy to clipboard
{filter type="wiki page"} {filter content="custom"}


But this wiki_content would have been neat ! 😉

posts: 126886 United Kingdom
Bernard Sfez / Tiki Specialist wrote:
Field wiki_contents does not exist in the current index


This is due to a somewhat mysterious change LPH made back in the olden days in this commit which i thought i had changed at some point so we could search the unparsed wiki markup if needed, but maybe i ended up finding another way round (probably using smarty)

If you have time to try it, change 'wiki_content' => false to 'wiki_content' => true on line 200 of lib/core/Search/ContentSource/WikiSource.php, reindex and try the wiki_content filter again - if it works and doesn't add much to the size of the index we could try it in 25.x and see how we go?

I think it would make life easier in the long run!

posts: 8633 Israel
Jonny Bradley wrote:

This is due to a somewhat mysterious change LPH made back in the olden days in this commit which i thought i had changed at some point so we could search the unparsed wiki markup if needed, but maybe i ended up finding another way round (probably using smarty)

If you have time to try it, change 'wiki_content' = false to 'wiki_content' = true on line 200 of lib/core/Search/ContentSource/WikiSource.php, reindex and try the wiki_content filter again - if it works and doesn't add much to the size of the index we could try it in 25.x and see how we go?

I think it would make life easier in the long run!


Thank you @jonnybradley.

Long time I didn't commit anything.

I have to set a clean dev environment (quite easy with git today) for this, Hebrew translations and may be more (it is several month now I want to remove deprecated code about Israel Post payment gateway). So... may be soon. 🤷🏻‍♂️🤗

"within the "raw" markup of wiki pages" I understand it would be possible to grab the itemId from within the footnote plugin. Correct ?


posts: 8633 Israel

I tried your suggestion, but it seems that's not enough.
I have a wiki page with the following:

unepagedetest

deuxpagedetest titre
deuxpagedetest


On another page I set a plugin list with:

Copy to clipboard
{LIST()} {filter type="wiki page"} {filter field="wiki_content" content="unepagedetest"} {LIST}

This can find the page.

Then I try with "deuxpagedetest" that is inside the plugin but it is not found.

Copy to clipboard
{LIST()} {filter type="wiki page"} {filter field="wiki_content" content="deuxpagedetest"} {LIST}