Click here to register.
      
PBWG Banner


     Web Design, Templates, and Themes > Templating the AdminBar

Templating the AdminBar

User philadev
Date 2/14/2008 4:17 pm
Views 870
Rating 2    Rate [
|
]
Previous · Next
User Message
philadev

Has anyone out there customized their Admin Bar macro?

I found some code for our old Admin Bar that we had customized by using the general javascript function to build the panels and slider then if you look below you see we were using WebGUI tmpl_loops to build our own bar from scratch.

The question is, does anybody know if there are temlate loops and variable available through the adminBar macro? 

Thanks, Nate

Custom AdminBar Template Excerpt ------------------- 

panel = new createPanel("adminConsole","Admin Console");
    <tmpl_loop adminConsole_loop>
        <tmpl_loop items>
            <tmpl_if canUse>panel.addLink("<tmpl_var icon.small>","<tmpl_var title escape=JS>","<tmpl_var url escape=JS>");</tmpl_if>
        </tmpl_loop>
    </tmpl_loop>

slider.addPanel(panel);

   slider.addPanel(panel);
if('Admins");') {
panel = new createPanel("websitego","WebSite GO Tools");
    panel.addLink("adminConsole/small/help.gif","WebSite GO User Help","help");
    panel.addLink("adminConsole/small/users.gif","My Account Information","");  
    panel.addLink("assets/small/image.gif", " Global Images", "root/images/");

   
        panel.addLink("assets/small/folder.gif", " CSS", "css?func=manageAssets");
        panel.addLink("assets/small/folder.gif", " Root", "root?func=manageAssets");
        panel.addLink("assets/small/folder.gif", " Templates", "templates?func=manageAssets");
    }
 

--- (Edited on 2/14/2008 4:17 pm [GMT-0600] by philadev) ---



Back to Top
Rate [
|
]
 
 
colink

The question is, does anybody know if there are template loops and variable available through the adminBar macro? 

There is documentation for the Admin Bar template, but there's not much to it.

Turn on Admin

Go to the Admin Console

Select Help

Scroll down to Admin Bar Macro and select it. 

--- (Edited on 2/14/2008 4:24 pm [GMT-0600] by colink) ---



Back to Top
Rate [
|
]
 
 
philadev

Thanks for the response.

I was hoping to find out whether or not the arrays in the Admin Bar macro bubble up to the template loops. And if they do, how they translate.

I see the arrays being built in the AminBar.pm and the javascript functions that are building the slider panel makes sense but I can't seem to connect them.

This may be outside the question I posed originally but do you know if the tmpl_loop is actually attached to the arrays in the PM files or a better question would be how they are attached?

Like I said, thanks. 

--- (Edited on 2/15/2008 11:43 am [GMT-0600] by philadev) ---



Back to Top
Rate [
|
]
 
 
colink

It's essentially a loop of loops, and there is a 1:1 correspondance between what's made in the Macro file, and used by the template.

AdminBar contains several loops.  Each loop has a name, an i18n'ed label and a loop containing items for itself.  Each subloop entry contains an icon, a URL and an i18n'ed label for itself.

Any "panel" specific magic is probably contained in the javascript, but I haven't checked yet.

--- (Edited on 2/15/2008 12:04 pm [GMT-0600] by colink) ---



Back to Top
Rate [
|
]
 
 

Re: Overriding inbox emails by JT - Sun @ 07:35pm

Re: Buying documentation from plainblack by knowmad - Sun @ 07:28pm

Re: Lincense Issues by knowmad - Sun @ 07:15pm

Re: Overriding inbox emails by knowmad - Sun @ 07:12pm

Re: Advanced Search template by knowmad - Sun @ 06:57pm

Re: The goal by dionak - Sun @ 01:20pm

Re: How to connect a Profile Field to a User Group? by LoopSetShop - Sun @ 11:13am

Re: How to connect a Profile Field to a User Group? by LoopSetShop - Sun @ 10:45am

Re: How to connect a Profile Field to a User Group? by perlDreamer - Sun @ 10:32am

How to connect a Profile Field to a User Group? by LoopSetShop - Sun @ 09:45am

Re: WebGUI Drinks by bernd - Sun @ 07:58am

Re: RSVP function in WebGUI? by pvanthony - Sun @ 03:26am

Smoketest For nightly_2008-09-07 by Visitor - Sun @ 01:47am