passing info by page alias

General project discussion. NOT for help questions.
Post Reply
goforward
New Member
New Member
Posts: 6
Joined: Mon Oct 16, 2006 11:21 pm

passing info by page alias

Post 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?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: passing info by page alias

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
goforward
New Member
New Member
Posts: 6
Joined: Mon Oct 16, 2006 11:21 pm

Re: passing info by page alias

Post 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?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: passing info by page alias

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
goforward
New Member
New Member
Posts: 6
Joined: Mon Oct 16, 2006 11:21 pm

Re: passing info by page alias

Post by goforward »

ahh... perfect...  works a treat!

thank you.
Post Reply

Return to “General Discussion”