WebsiteBaker 2.13.8 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
$sLink = '/something/something-else'; // from database$sOut = str_replace("//", "/", $this->oReg->PagesDir.$sLink.$this->oReg->PageExtension);
if (!is_readable(WB_URL.'/short.php')) { $sOut = str_replace("//", "/", $this->oReg->PagesDir.$sLink.$this->oReg->PageExtension);} else { $sOut = ...}
// at the top of page use addon\output_filter\Filters\ShortUrl\{Filter};.... // My content that goes to page $sMyContent = '.....'; // Filter Short $aFilterSettings = []; $sSql = "SELECT `value` FROM ".TABLE_PREFIX."mod_output_filter WHERE `name` = 'ShortUrl' "; $aFilterSettings['ShortUrl'] = ($oDb->get_one($sSql) ?? 0); $cFilter = new Filter($oReg, $aFilterSettings); // Apply filter $sMyContent = $cFilter->execute($sMyContent);