Hello,
What I am trying to do is to create live ajax search , and I want to create links for items.
So far the links are created inside my custom class:
$sLink = '/something/something-else'; // from database
$sOut = str_replace("//", "/", $this->oReg->PagesDir.$sLink.$this->oReg->PageExtension);
This is later used inside ajax.php file, and content is sent to site.
What my problem is , that if ShortUrl is enabled , I would like to automaticly rewrite links (that removes /pages/ and .php ).
Is there a code inside wb for this ? And how can I detect if ShorUrl is enabled or not (I could not find in oReg, oRequest, oApp) ?
So far I see two solutions.
1. Where links are created in my custom class, to use method page_link() from wb abstract class, but since wb class is abstract, I cannot use it inside my custom class (is there a way to use method page_link() ?)
2. or in ajax.php I have output that I want to display inside string ($sOutput), where I could apply filter on my content, that I saw in output_filter\Filters\ShortUrl Filter class file. Is there an example how to apply filter to custom string or to use inside custom class method ?