[geeklog-users] switching blocks

Jannetta Lewis Jannetta.Lewis at newdur.ac.uk
Wed Mar 24 05:17:11 EST 2004


Hi Tony

Thanks for your response. I am busy writing a new block and plug-in
that will do the thing. The menu plugin is not quite what I want.

However, I now have a question, since I'm still trying to get my head
around the way Geeklog works. What is the right way of saving a variable
for global access. For the moment I have done something like this, but
I'm sure it is not the right way to do it:

session_start();
$block = $_GET["blockmenu"];
if (isset($block)) {
	$_SESSION["onswitch"]=$block;
} else {
	$block=$_SESSION["onswitch"];
}

I couldn't find an explanation in the docs - did I miss it?

Thanks so long for any help
Jannetta



====
New College Durham
Product Development Co-ordinator
X4434

>>> tony at tonybibbs.com 22/03/2004 17:07:05 >>>
You'd have to do this in a PHP block.  From there you could declare any

PHP global variables you need such as $PHP_SELF, $_REQUEST, $_GET, 
$_POST or, if you are on PHP older than 4.1 $HTTP_POST_VARS and 
$HTTP_GET_VARS.

Also you may want to look into the menu plugin that I have seen but 
haven't tried as it may do this kind of stuff for you.

Either way it is very doable given somone with a little PHP kumg-fu.

Hope that helps.

--Tony

Jannetta Lewis wrote:
> Hi Folks
> 
> I hope I can explain myself adequately here - I'll give it a go ...
> 
> Is it currently possible to switch blocks on and off based on menu
> items, or links? We want to use geeklog for our intranet (and maybe
even
> our Internet site). However, we have loads of links, mainly leading
to
> static pages. So I want to create one block with main menu items and
> then have another block that changes, depending on which item you
have
> clicked, displaying the sub-menu items. This way, the column on the
left
> with all the blocks stays nice and short. I really hate those web
pages
> that scrolls down forever!
> 
> Does that make sense to anybody?
> 
> Regards
> Jannetta
> 
> ====
> New College Durham
> Product Development Co-ordinator
> X4434
> _______________________________________________
> geeklog-users mailing list
> geeklog-users at lists.geeklog.net 
> http://lists.geeklog.net/listinfo/geeklog-users 
_______________________________________________
geeklog-users mailing list
geeklog-users at lists.geeklog.net 
http://lists.geeklog.net/listinfo/geeklog-users



More information about the geeklog-users mailing list