Click here to register.
      
irc://irc.freenode.net#webgui

iPhoneGuy: WebGUI is a pile of crap.
rizen: If WebGUI is such a pile of crap, why do you use it?
iPhoneGuy: Because it's the best pile of crap out there.

If this is what people who hate us are saying, imagine what people who love us will say. Come join us on IRC.


     Discuss > Web Design, Templates, and Themes

Templating the AdminBar

User philadev
Date 2/14/2008 4:17 pm
Views 848
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: Can a WebGUI navigation generate li's of different sizes? by knowmad - Wed @ 10:11pm

Re: WRE upgrade 0.8.3 to 0.8.4 issue by pvanthony - Wed @ 09:07pm

Re: New default WebGUI templates by rogier - Wed @ 09:18am

YAHOO.util.Easing by lrobinson - Wed @ 05:07am

Re: Can a WebGUI navigation generate li's of different sizes? by xootom - Wed @ 03:57am

Can a WebGUI navigation generate li's of different sizes? by kurios63 - Wed @ 02:40am

Smoketest For nightly_2008-08-27 by Visitor - Wed @ 01:53am

Re: localhost WRE Service Alert by wguser - Tue @ 05:07pm

Re: localhost WRE Service Alert by susanb - Tue @ 04:47pm

localhost WRE Service Alert by wguser - Tue @ 04:37pm

Multiple Attachments in SQL Form? by eleger81 - Tue @ 02:59pm

Re-design of "Get Add Ons" section by bernd - Tue @ 01:33pm

WRE upgrade 0.8.3 to 0.8.4 issue by xootom - Tue @ 05:37am