Page 1 of 1

passing info by page alias

Posted: Fri May 02, 2008 2:20 am
by goforward
Hi there,

I would like to be able to rename a page alias as follows:  productxyz&category=1

to allow me to $_get the category number when querrying a database on page load.

however, when I save the page, it reverts the name of the page to productxyz-category-1.

Does anyone know whether what I would like to to do achieveable?

Re: passing info by page alias

Posted: Fri May 02, 2008 2:33 am
by calguy1000
well you can't use the page alias in this way.

but there's lots of ways that you can pass variables to the page
you could assign a variable to smarty in the metadata section of the page
and then you can extract it with your php code.

but maybe a better explanation of what you're trying to do would help.

Re: passing info by page alias

Posted: Fri May 02, 2008 7:08 am
by goforward
Hi there calguy1000

Here's an explanation of what I would like to acheive..

I want to integrate into CMSMS a product catalog, that has many product categories.

the code for the catalog is included on each of the catalog pages.

so what I need to acheive is, when a catalog page loads (for instance 'leather jackets'), the categoryid gets passed with the page load, so i can set an appropriate database query with the relevant category id to only display leather jackets.

make sense?

Re: passing info by page alias

Posted: Fri May 02, 2008 2:13 pm
by calguy1000
oh, so you're re-using the same page for multiple different categories.

if this is the case, and you want numerous menu items to point to that page with the category name as a parameter in GET

then a) make your original page not shown in the menu
and b) create numerous 'links' to the page using the link content type.

Re: passing info by page alias

Posted: Fri May 02, 2008 9:30 pm
by goforward
ahh... perfect...  works a treat!

thank you.