PDA


View Full Version : page identification without query string


RSimpson
06-27-2005, 07:40 PM
Hi folks,

Here's what I'm trying to do.

Currently to select a different page you need to use /root/cmps_index.php?query=pagename. What I'd like to do is put the query in php file itself so using multiple index files I can select different pages. For instance: /root/news/category1/ will show the page with the query newscategory1 (/root/cmps_index.php?query=newscategory1) and /root/news/category2/ will show the page with the query newscategory2 (/root/cmps_index.php?query=newscategory2) and so on.

I've tried adding $query = "pagename"; to the file just above the forum path but it's just showing the default page.

Anybody got any ideas how I could make this work? It's probably a walkover but I haven't touched PHP in a while so I'm a bit rusty.


Cheers,
Robert

Brian
06-29-2005, 06:55 PM
Make a copy of your cmps_index.php file and place one in each of those directories. Then edit the file you just created and look for this code:
define('VBA_SCRIPT', 'CMPS');

Right below that, add:
define('VBA_PAGE', 'page_identifier_here');

Then just replace page_identifier_here with the identifier you used for that page.