PDA

View Full Version : Passing construct_page_nav variables to module


Fargo
11-13-2004, 12:39 AM
Well, just when I thought I was in the clear...

The code that im working on requires me to send the pagename as a variable in the construct_page_nav() syntax. This works out just fine as a standalone php file, but its going to cause a little problem when I convert it over to a module.

Im trying to prevent creation of unnecessary CMPS pages so if its possible, is there any way to retrieve the url of the current page and assign it to a variable?

current call to construct_page_nav is this:
$pagenav = construct_page_nav($rows,"game_info.php?$session[sessionurl]siteid=$siteid&do=screenshots", "&pp=$perpage");

but I would really like to do something like this:
$pagenav = construct_page_nav($rows,"$thispage?$session[sessionurl]siteid=$siteid&do=screenshots", "&pp=$perpage");

Fargo
11-13-2004, 07:55 AM
looks like ive figured it out!

Heres the result for future reference in case anyone needs to know.....


$pagenav = construct_page_nav($rows,"$_SERVER[PHP_SELF]?$session[sessionurl]siteid=$siteid&do=screenshots", "&pp=$perpage");


$_SERVER[PHP_SELF] is what returns the current script page. I tried to assign this value to a variable ($thispage = $_SERVER[PHP_SELF]), but it kept killing the page. Anyone have any clues?