Customizing output from core.SystemLinks

Paullezzz007

Joined: 2007-12-12
Posts: 3
Posted: Wed, 2007-12-12 13:58

Hello,

I am trying to create a custom theme based on the Matrix theme, just to get to know how this sytem works. But i am searching for a couple hours now for a way to create a mootools dropdown top menu.

The folowing code produce this kind of HTML:
At templates/theme.tpl

<div class="gbSystemLinks">
 {g->block type="core.SystemLinks"
 order="core.SiteAdmin core.YourAccount core.Login core.Logout"
 othersAt=4}
</div>

The HTML code created:

<div class="gbSystemLinks">
<span class="block-core-SystemLink">
<a href="/main.php/admin/?g2_return=%2Fmain.php&amp;g2_returnName=album">Site Beheer</a>
</span>
<span class="block-core-SystemLink">
<a href="/main.php?g2_view=core.UserAdmin&amp;g2_subView=core.UserPreferences&amp;g2_return=%2Fmain.php&amp;g2_returnName=album">Uw account</a>
</span>
<span class="block-core-SystemLink">
<a href="/main.php?g2_controller=useralbum.UserAlbum&amp;g2_authToken=dadf57fd7314">Uw Album</a>
</span>
<span class="block-core-SystemLink">
<a href="/main.php?g2_controller=core.Logout&amp;g2_return=%2Fmain.php&amp;g2_returnName=album&amp;g2_authToken=dadf57fd7314">Uitloggen</a>
</span>
</div>

What I would like to get is just the link, so I can put that link inside a <a href=""> tag:

<ul>
<li><a href="' . core.SiteAdmin . '">Site admin</a></li>
</ul>

If any one knows this please tell me how to do this, I am willing to submit my new created them when it is finished.

Thanks,
Paul

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2007-12-12 15:13

The file you want to edit is modules/core/templates/blocks/SystemLinks.tpl
in G2.3 your theme can override modules template files. But in the mean time you have to use a local folder.
See: http://codex.gallery2.org/Gallery2:Editing_Templates Use a theme override

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Paullezzz007

Joined: 2007-12-12
Posts: 3
Posted: Wed, 2007-12-12 15:37

Ok, so in the next version I can simply overide the default output from a block ??
I am currently on 2.2.3 so I have to find a workaround for this moment.

I will have a look to the page you gave.

Thanks for the reply b.t.w

Paul

EDIT:
I took al look at that page, and since I am not a programmer I have to study this a bit more. I more a guy of basic XHTML and CSS layouts

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2007-12-12 16:20

You have to explain what you mean by "a way to create a mootools dropdown top menu" , if you need more help.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Paullezzz007

Joined: 2007-12-12
Posts: 3
Posted: Thu, 2007-12-13 15:47

Don't you know Mootools ??
I would like to create a topmenu bar with all subitems on that bar in a dropdown menu. This can be done by Mootools.

I think I first finish my layout and then convert it to a gallery theme, this will be a circus trick for me but I'll do my best.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2007-12-13 16:53
Quote:
Don't you know Mootools ??

no.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
gjschaller
gjschaller's picture

Joined: 2004-04-19
Posts: 44
Posted: Thu, 2008-01-10 01:02

I'm looking to do something similar, but can't quite seem to find the code I need to edit...

At the top of the menu, where it currently reads "Site Admin Your Account Logout" I would like to add additional links - "Main Website, Forums," etc.

However, I looked in modules/core/templates/blocks/SystemLinks.tpl and I can't see the code that actually specifies the links themselves. Am I just missing it, or is it somewhere else?

--
Geoffrey J. Schaller
http://gallery.knightrealms.com

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2008-01-10 02:22

Still don't have a clue what Mootools is.
But if you want extra links:
http://codex.gallery2.org/Gallery2:Modules:linksinhead
there is also the about page, links page, contact owner 3rd party modules: http://codex.gallery2.org/Gallery2:User_Contributions#Modules

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
gjschaller
gjschaller's picture

Joined: 2004-04-19
Posts: 44
Posted: Thu, 2008-01-10 02:38

Wonderful, just what I needed! Thank you!

--
Geoffrey J. Schaller
http://gallery.knightrealms.com

 
lucascarnato

Joined: 2008-12-29
Posts: 4
Posted: Mon, 2008-12-29 15:33

Have you got an idea of how I can get the core.SystemLinks block outside gallery?
I tried the function GalleryEmbed::getBlock('core','SystemLinks'...) but when I see the HtmlBlock it is empty

any help?

Luca