New area variable naming conventions. . .

Permalink
I'm having issues wrapping my mind around new area variables naming conventions.
For example, say I made a new sidebar area in my left-sidebar template page:
<aside>
       <?php 
         $as = new Area('Sidebar');
         $as->display($c);
      ?>
        </aside>


Now that uses $as as the variable. Is that a predefined convention I should use? If so, where can I find the proper documentation on it?
Or can $as be anything, such as $xyz or something else?

Also, say on that same page I add another editable region:
<div id="main" class="clear_fix">
        <?php
         $as = new Area('Main');
         $as->display($c);
      ?>
        <br class="clear" />
       </div>


Does $as need to be something different here?
Also say I add a third editable region on another template page. Can I use the $as variable on it for that third region, or should $as be reserved for the sidebar area, no matter what page it's on?

I've got a sidebar in my template currently, and for some reason I can't edit it. When in edit mode, the area gets the gray box showing it's editable when I hove over it, but the cursor is either a text-place cursor or an arrow, it doesn't change to the 4 point arrow like normal. When I click, nothing happens, the edit options dialog doesn't show. I'm thinking there previously mentioned variables may be the cause.
Anyone care to shed a little light on this for me?
Thanks in advance—c5 4ever!
Kev

Abs0lute
 
aghouseh replied on at Permalink Reply
aghouseh
Each page Area becomes that object, in this case you are using $as. You need to have a unique variable for each separate area that you are implementing on your page. There no hard, fast rules for naming these. I prefer to use an abbreviation of the area name, e.g. $as for aside or $m for main, but that's entirely up to you.
Mnkras replied on at Permalink Reply
Mnkras
The variable can be anything except for a bunch of reserved variables, like $c and $u, you can have multiple areas that use $a as their variable there will be no conflict.

$a = new Area('Main');
$a->display($c);

and
$a = new Area('Sidebar');
$a->display($c);

will work fine on the same page.
Mnkras replied on at Permalink Reply
Mnkras
I think it may be a z-index issue.
Abs0lute replied on at Permalink Reply
Abs0lute
Thanks guys!
Well, I guess that's not the cause of the editable area not working right.
I know $c is a reserved variable. Where can I get a list of reserved variables? I didn't know $u was one of them. That'd be good to know.
I adjusted the z-index and that doesn't resolve anything.
I do have an absolutely positioned element that is in my main area, beside the sidebar, but it is negatively positioned to be about 400px above the main area and is about 100px bigger than the main area. It's z-index is less than the sidebar though.
Maybe that's what's making it not work correctly?
I noticed the gray editable box for the absolute element shows up just below the element, where it should technically be if it didn't have a position of top:-325px;
That gray edit box does overlap the sidebar.
Any other clues?
Thanks again for clarifying the variables!
Mnkras replied on at Permalink Best Answer Reply
Mnkras
there really isn't a list, just some things like $c is for collection $u is for user and $cp is for collection permissions, I think that this is purely a css issue, try playing with it in firebug or something.
Abs0lute replied on at Permalink Reply
Abs0lute
Thanks Mnkras,
I'll experiment and see what can resolve the issue. I'm with you, I think it may just be in the CSS and possibly how it's laid out w/ CSS.
Abs0lute replied on at Permalink Reply
Abs0lute
Got it. It was the css. Oddly enough, the main area needed a left margin on it. I guess c5 needed that for it to clear over the aside and register? Z-index didn't seem to do the job.
Anyways, thanks for your help and time.
Kev