Welcome Guest, Not a member yet? Register   Sign In
Add new category to entire site
#1

[eluser]Dauntless[/eluser]
Hi,

I couldn't find a better title to describe my problem, sorry.

Situation: I have a website that promotes a bunch of products. It's a pretty basic website which basically lists products that are divided in a bunch of (sub)categories. The company rents these products, but they now also want to sell some of the products. The client wants a splash page that has 2 buttons: Rent & Sales but they basically result in the same website, just with a different content & logo.

How could I do this best? The only option I can think of is to keep the selection stored in the session and retrieve the products according to this value. I'm wondering however if there's a better way. Maybe use htaccess to have 'rent/' and 'sales/' in the url (this would also help with SEO) but is it possible to have all uri-segments 'move to the right' easily? I sometimes have $this->uri->segment(2) so I'm guessing that wouldn't work anymore...

I hope my explanation is clear (I kind off doubt it :p) and that someone has some suggestions as to how I would implement this new feature.

Greets!
#2

[eluser]TheFuzzy0ne[/eluser]
Is there any reason why you can't have a subdomain for each, and redirect accordingly? That will support users who have cookies disabled, or are cookies required to use the site?
#3

[eluser]GSV Sleeper Service[/eluser]
sounds like it could be a job for [url="http://ellislab.com/codeigniter/user-guide/general/routing.html"]custom routes[/url]
#4

[eluser]Dauntless[/eluser]
-subdomains: I can create subdomains for the two parts, but how would I be able to know (in CI) if I'm in sales or rent ? Just explode the url and retrieve it manually ? And wouldn't this mean that the site has to be hosted on both subdomains? (=> Harder to maintain)
-custom routes aren't really what I need...
#5

[eluser]TheFuzzy0ne[/eluser]
Yes, exploding the URI would work beautifully.

Both sub domains would point to the same Web site, the subdomain would simply be used by CI to figure out how to render the site (I used this method on a multi-language site I worked on). You'd just need to figure out the default for how your site will render if neither subdomain are used.




Theme © iAndrew 2016 - Forum software by © MyBB