Click here to register.
      
Sprechen Sie WebGUI? Parlez vous WebGUI? Se habla WebGUI? Spreekt u WebGUI?

Do you speak WebGUI? Please help us translate WebGUI into your language.



     Templating the AdminBar > Re: Templating the AdminBar

Templating the AdminBar

User philadev
Date 2/14/2008 4:17 pm
Views 869
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: OReilly by koen - Sat @ 06:44pm

Re: OReilly by JT - Sat @ 12:46pm

Re: Glad to be here by Mike_S - Sat @ 09:11am

Partner Marketing Goals? by koen - Sat @ 08:15am

Re: OReilly by koen - Sat @ 08:07am

Re: Glad to be here by koen - Sat @ 08:05am

Re: WebGUI Drinks by Albert2 - Sat @ 05:06am