<div dir="ltr">Thank you Petko, I got it working. <br>Ultimately, the problem was not (only) in the $opt building process, but I had the markup executed at the wrong time in the page creation process.<br>I had it with 'style", but at that time in the $query<br> "'''UPORABNOST''': strupen<br>has already been converted to<br> <strong>UPORABNOST</strong>: strupen, and thus it never found the phrase on the pages.<br>I moved the markup to <inline, and now it works correctly.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Mi., 28. Juni 2023 um 13:54 Uhr schrieb Petko Yotov <<a href="mailto:5ko@5ko.fr">5ko@5ko.fr</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">In theory, you should be able to do something like this:<br>
<br>
$query = "seznam×nadaljevalni \"'''UPORABNOST''': strupen\" <br>
name=-$pagename";<br>
<br>
$opt = ParseArgs($query, $GLOBALS['PageListArgPattern']);<br>
<br>
This should populate the $opt array like this:<br>
<br>
$opt = [''=>["seznam×nadaljevalni", "'''UPORABNOST''': strupen"], <br>
'name'=>"-$pagename" ];<br>
<br>
Or you can define this array yourself if it makes more sense to you.<br>
<br>
The element with an empty key $opt[''] is an array with all words or <br>
phrases that are required to be in the page texts.<br>
<br>
Then you should be able to use this with:<br>
<br>
$list = []; # defined before next line<br>
FPLTemplatePageList($pagename, $list, $opt);<br>
# use $list<br>
<br>
<br>
In pagelist.php, the parsing of the query string happens in the first 30 <br>
lines of FmtPageList() but indeed it is complicated to follow, as these <br>
are merged with some default settings, and with any request variables.<br>
<br>
Petko<br>
<br>
<br>
On 28/06/2023 13:18, Gregor Klarič wrote:<br>
> I am using the FPLTemplatePageList function in a custom markup in<br>
> this way<br>
> <br>
> $opt = [''=>$searchwords, 'name'=>"-$pagename" ];<br>
> FPLTemplatePageList($pagename, $list, $opt);<br>
> <br>
> where $searchwords is an array of the search words which I am<br>
> providing by parsing the parameters of my markup. I don't seem to<br>
> parse it right though.<br>
> <br>
> I would like to parse this search query as it is:<br>
> seznam×nadaljevalni "'''UPORABNOST''': strupen"<br>
> <br>
> to produce this result:<br>
> <br>
> <a href="https://www.gobe.si/Gobe/AgaricusAugustus?fmt=%23title&order=title&name=-*RecentChanges*&action=search&q=seznam%C3%97nadaljevalni+%22%27%27%27UPORABNOST%27%27%27%3A+strupen%22" rel="noreferrer" target="_blank">https://www.gobe.si/Gobe/AgaricusAugustus?fmt=%23title&order=title&name=-*RecentChanges*&action=search&q=seznam%C3%97nadaljevalni+%22%27%27%27UPORABNOST%27%27%27%3A+strupen%22</a><br>
> <br>
> but I can not find the piece of code in pagelist.php that pases this<br>
> and builds the correct $searchwords and $opts variable.<br>
</blockquote></div>