Karamellwuerfel Posted November 7, 2019 Report Posted November 7, 2019 Hello, in the admin navigation is a variable to show the addons installed on the page: $MODULE_NAV_INC It will echo this: <li><a href="http://xxxxxxx.xxxxxxxxxxx.xx/admin/index.php/FAQ">FAQ</a></li> Is there a way to change the content's design? Like removing the <li></li> or add classes to the <li>? It's defined in the "admin/index.php": Template::Set('MODULE_NAV_INC', $NAVBAR); But I dont find more... Or is there a other way to get the addons (url and name) of the site? Thanks!! Quote
Karamellwuerfel Posted November 14, 2019 Author Report Posted November 14, 2019 Okay - so now after a week no reply. I have done a workaround. got all links from $MODULE_NAV_INC and explode them with PHP into an array on the "<li>" element. create a empty array for save my results loop all $links (first "link" is empty - so check if empty and jump over empty links) for each link I strip the tags and save it as name; and save the link as url I save this array in my result array Now I can loop the result array and use the links and names The code (not the right way I think, but I don't know how to do it in phpvms...): <?php $links = explode("<li>", $MODULE_NAV_INC); $result_array = array(); foreach ($links as $link) { if(empty($link)) continue; preg_match_all('#\bhttps?://[^,\s()<>]+(?:\([\w\d]+\)|([^,[:punct:]\s]|/))#', $link, $match); $res = array( "name" => strip_tags($link), "url" => $match[0][0] ); $result_array[] = $res; } ?> Thanks. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.