Jump to content
Karamellwuerfel

Admin Theme

Recommended Posts

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!!

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...