Zend and URLs Problem

1 view
Skip to first unread message

flickle1

unread,
Sep 21, 2009, 5:50:55 PM9/21/09
to Zend Framework Developers
Hello i am simply trying to configure my controllers and action within
zend to create my desired url sequence.

my desired example:
http://www.example.com/shop/5/120/111

(explained in detail)
1) for my website i would like a category
http://www.example.com/shop/
i can easily achieve this using a standard controller

2) next i would like to add like a dynamic action in which i can use
any numeric number to perform the same action as these are going to be
classed as 'categories' within the shop controller
http://www.example.com/shop/1
http://www.example.com/shop/2
http://www.example.com/shop/3

So as you see the equivilent could be infact
http://www.example.com/shop/books
http://www.example.com/shop/games
http://www.example.com/shop/videos
although i prefer numbers instead this can probaly be create using the
actions although they would need to be dynamic actions as the number
may range from 1-100+depending on categories.

3) the next step is the sub categories which would be arranged like so
http://www.example.com/shop/1/1
http://www.example.com/shop/1/2
http://www.example.com/shop/1/3
http://www.example.com/shop/1/4

so you see here this sequence would enable
http://www.example.com/shop/category/subcategory
http://www.example.com/shop/1/2

4) Lastly i would like one last instance place on the end which would
represent the page number like so
http://www.example.com/shop/1/2/1
http://www.example.com/shop/1/2/2
http://www.example.com/shop/1/2/3

so in simple this if the formula
http://www.example.com/shop/"category/subcategory/pagenumber"

it is relatively a simple formula but does anyone know how i can
perform this
type of url setup using Zend controllers and actions?

If anyone can help this would be most helpful for me thanks.
i would like to say mainly that using php explode i can retrieve this
information from the url to pull data from the database. so all i need
is the controllers to create such a sequence in the first place.

thanks
mrdaniellee







Reply all
Reply to author
Forward
0 new messages