Welcome Guest, Not a member yet? Register   Sign In
URLS and reviews
#1

[eluser]stuffradio[/eluser]
I have a question. I'm doing a website where there are reviews, both user generated and admin generated (admin meaning from the admin panel I made for it). Is there a way to have a url like this "http://mysite.com/view/review/reviewtitle" and not require the review titles to be unique?

I'm trying to convince my client there is no way to do this if that's how he wants the url to be... but if I'm wrong on this one if there was a way to do this without needing to have the url be something like "http://mysite.com/view/review/username/reviewtitle" then I'd love to know!

These are game reviews. If you click on the game and you click on view game review, my suggestion was to have that first url, and then it would select the review title that is marked as official in the db. If it's a user review, it would go to the second url, but ideally he wants to be able to do the first url in all instances and unless I have it automatically post the username using AJAX or something... I don't know how to do that especially since it wouldn't work if you go there directly.
#2

[eluser]mddd[/eluser]
You could just show a list of reviews with that title, if there's more than one.
Or you could both the title and the id of the review in the url. The id is unique, and the title makes the url readable and searchable.
Code:
www.example.com/review/1234/mario-galaxy-2
To get the review from your database you just look at the '1234' part.
#3

[eluser]stuffradio[/eluser]
I know I could do the id, I already know of ways I can do it, but I'm trying to think of a way to do it this way because of what he wants the url to look like.
#4

[eluser]clip[/eluser]
The only thing I could think of other than using AJAX would be to use a simple form with the submit button styled to look like standard links and a hidden field with the title_id or whatever.

As far as pulling up the link directly, you would have to set up a default view or something. I don't understand why your client would want that though due to seo. To each their own I guess.




Theme © iAndrew 2016 - Forum software by © MyBB