Getting admin and user sidebar to behave with the rest of the site

Jacynthe_D

Joined: 2009-08-15
Posts: 3
Posted: Sat, 2009-08-15 02:30

I was hired to upgrade a gallery install to the latest stable release and have been having a ... "blast" shall we say retemplating the whole thing to work with the customer's site. After much headbanging against the wall and what not, I have gotten it to where I want it to be EXCEPT when it comes to the bloody admin and user sidebars (when you click either Site Admin or Your Account).

The image below shows the correct behavior and the way both sidebars behave.
[img]http://www.jacynthedurocher-media.com/sidebar.jpg[/img]

I know that both the SiteAdmin and UserAdmin templates are in the core/templates folder - I figured that much already - but for the life of me I cannot wrap my head around the way I would go about fixing the issue.

The way both those files are set, the "menu" AND the content are in a table hence why I can't dissociate the content from the menu. BUT, since I would like for the menu to be located in the sidebar and the content to be in the content-pane... I kinda have to separate them somehow.

Any help would be greatly appreciated as I've been looking at this for the best part of 2 hours and am still no closer to finding the solution than I was when I started.

Thanks.

 
Jacynthe_D

Joined: 2009-08-15
Posts: 3
Posted: Sat, 2009-08-15 03:32

Alright I found a way to do this.... maybe not the BEST way but this works just fine anyways.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2009-08-15 05:29

I bet there was some template issues?
FAQ: How can I make sure that my installation files are all intact?
might have helped. as well as looking for /local/* files

glad you got it sorted.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Jacynthe_D

Joined: 2009-08-15
Posts: 3
Posted: Sat, 2009-08-15 13:52

Actually... it's just that I took all that was in the SiteAdmin.tpl and UserAdmin.tpl in modules/core/templates/ that was related to the menu... and transfered that in the sidebar.tpl by adding the {if} statements

so I basically now my sidebar looks like this

<div id="gsSidebar" class="gcBorder1">
  {* Show the sidebar blocks chosen for this theme *}
  {foreach from=$theme.params.sidebarBlocks item=block}
    {g->block type=$block.0 params=$block.1 class="gbBlock"}
  {/foreach}
{if $user.isAdmin}
<div class="gbBlock2">
    <ul id="gbSiteAdminLinks">
	 {foreach from=$SiteAdmin.subViewGroups item=group}
	  <li> <span>{$group.0.groupLabel}</span>
	    <ul>
	      {foreach from=$group item=choice}
		<li class="{g->linkId view=$choice.view.subView}">
		{if !empty($choice.selected)}
		  {$choice.name}
		{else}
		  <a href="{g->url params=$choice.view}">
		    {$choice.name}
		  </a>
		{/if}
	      </li>
	      {/foreach}
	    </ul>
	  </li>
	  {/foreach}
	</ul>
</div>
{/if}
{if $user.isRegisteredUser}
<div class="gbBlock2">
  <ul>
    {foreach from=$UserAdmin.subViewChoices item=choice}
	   <li class="{g->linkId urlParams=$choice}">
	      {if ($UserAdmin.subViewName == $choice.view)}
		{$choice.name}
	      {else}
		<a href="{g->url arg1="view=core.UserAdmin" arg2="subView=`$choice.view`"}">
		  {$choice.name}
		</a>
	      {/if}
	      </li>
	    {/foreach}
	  </ul>
</div>
{/if}
</div>

By removing those "menu" options from the core templates and by removing the table, just leaving the call to the gallery file in SiteAdmin and UserAdmin, that did the trick. Not exactly mentioned in any of the FAQ I read!