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 733
Rating 4    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 [
|
]
 
 

Smoketest For nightly_2008-07-05 by Visitor - Sat @ 01:46am

Smoketest For nightly_2008-07-04 by Visitor - Fri @ 01:37am

Re: News Addon? by knowmad - Thu @ 06:04pm

Re: News Addon? by bepo - Thu @ 08:54am

Re: News Addon? by bepo - Thu @ 03:35am

Smoketest For nightly_2008-07-03 by Visitor - Thu @ 01:37am

Thingy Reporting (pt 2) by knowmad - Wed @ 05:37pm

Re: News Addon? by knowmad - Wed @ 05:12pm

spell checker and tinymce by elnino - Wed @ 04:50pm

Re: WebGUI works on perl 5.10 by knowmad - Wed @ 04:41pm

Re: how the cost installing WebGUI ?? by baylink - Wed @ 12:19pm

Re: News Addon? by bepo - Wed @ 07:38am

Re: News Addon? by bepo - Wed @ 03:38am