Rearrange order in sidebar

paullv

Joined: 2005-02-24
Posts: 22
Posted: Thu, 2005-03-10 16:34

Can i rearrange the order of items in sidebar? I'm newer to php and have try this in sidebar.tpl. Finally, I'm fail to reorder!

If I want the order to be:

Login
Search
Language
Action
Jump to Album
Ramdom image
Members (Admin)

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2005-03-10 18:58

the system loads the various blocks that are included, since they depend on which modules are installed.. so you can't see them all in sidebar.tpl to change the order.. however, look at how the Search content is included to be near the top.. you can use this technique to manually insert the other blocks you are using.

 
nzseriocomic
nzseriocomic's picture

Joined: 2004-07-20
Posts: 15
Posted: Thu, 2005-03-10 23:10

This is a large UI issue. To aid navigation, the drop-down album navigation box needs to be loaded earlier to be nearer the top. Either there should be a way to order the modules or we will be stuck with having to hard-code them in which seems painful.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2005-03-11 01:55

see Site Admin / Album Select too..

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2005-03-11 05:41

This is one of many UI issues that's on our radar. We're going to focus on UI problems like this during the beta cycle...

 
paullv

Joined: 2005-02-24
Posts: 22
Posted: Fri, 2005-03-11 07:53

Thanks all, I will try on it, it's good if there is option like this on layout too.. :)

 
paullv

Joined: 2005-02-24
Posts: 22
Posted: Fri, 2005-03-11 09:52

Anyway, How can i transform the "action" block to a menu? so the action block can save space!

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2005-03-11 15:59

make a local templates/sidebar.tpl that puts the actions in a <select> instead of a <ul> (look for "Item actions" in that file)
smarty.php.net for smarty docs if needed.

 
lvthunder

Joined: 2003-09-12
Posts: 808
Posted: Fri, 2005-03-11 18:31

Look at what I did in my layout. I have the Actions in a drop down box.

http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=26637

 
paullv

Joined: 2005-02-24
Posts: 22
Posted: Sat, 2005-03-12 12:26

Tks for the info. :)

 
paullv

Joined: 2005-02-24
Posts: 22
Posted: Sat, 2005-03-12 12:31

Is it something wrong with me! The selection box is empty!

{* Item actions *}
{if ($layout.show.sidebarActions && !empty($layout.itemLinks))}
<div class="gbMenu">
<h3 class="giTitle">{g->text text="Actions"}</h3>
<select>
{foreach from=$layout.itemLinks item=link}
<li class="gbAdminLink" id="gbLink_{$link.params.controller|default:''|safecssname}{$link.params.view|default:''|safecssname}{$link.params.subView|default:''|safecssname}">
<a href="{$link.url}">{$link.text}</a></li>
{/foreach}
</select>
</div>
{/if}

 
paullv

Joined: 2005-02-24
Posts: 22
Posted: Sat, 2005-03-12 13:25

Thanks for lvthunder, i copy the action item from lvthunder's theme, which is actually perfect for my need! Tks too much :)

 
dsawchuk

Joined: 2005-01-22
Posts: 84
Posted: Thu, 2005-04-07 07:11

Any update on being able to reorder items in the sidebar? I just started having a look at doing it and, so far, it's over my head.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2005-04-07 14:57

nothing beyond what sidebar.tpl does already to show search system content near the top.. you can use the same technique to put system content for particular modules in particular places.

 
lvthunder

Joined: 2003-09-12
Posts: 808
Posted: Thu, 2005-04-07 20:16

I think all that needs to be done here is to write the docs so that everyone knows what the variables are. Once that gets written and there are 20-30 layouts to choose from (made by members of the community that show different ideas) I think it will be a lot easier for the person without much PHP experience to make a layout. It will end up being cut this piece that I like from x layout and cut this piece from y layout and make z layout. The reason it seems hard now is that there are not a lot of examples and there is no documentation to say use this variable to call up the output of x module. When I am assured that the layout stuff isn't going to change I plan on writing two or three different layouts for people to use.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2005-04-07 20:26

if you turn on debug in config.php then every page pops up a smarty debug console that shows all the variables passed to smarty for that page.. perhaps that will help.

 
dsawchuk

Joined: 2005-01-22
Posts: 84
Posted: Fri, 2005-04-08 00:08

Yeah, I can't figure it out by looking at the sidebar.tpl file. I just want to be able to move the jumpmenu so that it's the next thing below the search. I don't know enough about php/smarty/the inner workings of G2 to be able to do that now. :(

 
HMetal

Joined: 2003-11-09
Posts: 16
Posted: Sun, 2005-04-10 04:00
dsawchuk wrote:
Yeah, I can't figure it out by looking at the sidebar.tpl file. I just want to be able to move the jumpmenu so that it's the next thing below the search. I don't know enough about php/smarty/the inner workings of G2 to be able to do that now. :(

It's really easy. All you do is remove the block from the sidebar.tpl template in the templates directory and add it to the pathbar.tpl file in the layouts/matrix/templates directory (assuming you're using the matrix theme).

Make sure you make a "local" directory and put these files in there instead of altering your originals.

Download my pathbar.tpl and sidebar.tpl fileshere

Check out the results (my G2 site) here: CodeMain Gallery

 
dsawchuk

Joined: 2005-01-22
Posts: 84
Posted: Mon, 2005-04-11 00:22

No, I still want the jumpmenu in the sidebar, I just want it to be the next item after the search in the sidebar.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2005-04-11 00:31
mindless wrote:
...what sidebar.tpl does already to show search system content near the top.. you can use the same technique to put system content for particular modules in particular places.

 
dsawchuk

Joined: 2005-01-22
Posts: 84
Posted: Mon, 2005-04-11 00:38

I saw that before. I can't really figure it out based on that. I guess I'm slow or something.