URL

4 posts by 2 authors in: Forums > CMS Builder
Last Post: May 29, 2009   (RSS)

By benedict - May 28, 2009

Hi guys,

I have a cabin website I'm working on, and I have the following scenario.

The visitor selects the cabins they like from the list_viewer and is presented with the detail page (cabin-overview.php) that has the price and general description of that cabin.

There are two extra tabs here "floorplans" and "full specs". I have created the floorplan layout and called it cabin-floorplan.php

I want to add the link to the floorplan tab so that it presents the floorplan for that particular cabin.

So far I have this, which works:

<a href="granny-flat-floorplan.php?<?php echo $granny_flatsRecord['num'] ?>"

But it presents the url with just the record number, not the SEO friendly URl with the cabin name in it and then the number:

cabin-floorplan.php?1

Can you please advise how I get the URL to look like:

cabin-floorplan.php?The-Hume-1

P.S. I tried using <?php echo $_GET['title']; ?> but this through up an undefined error.

Cheers,

B

Re: [benedict] URL

By ross - May 28, 2009

Hi Benedict.

Thanks for the email!

You are really close on this one :). What you'll want to do is use the title variable from your detail viewer. I don't quite know what it's going to be as that's a little different for everyone.

You'll see what I mean in the code generator though. Just grab the bit of code from there that makes your title appear and use it where you have the echo $_GET part.

Does that make sense? If you attached a copy of your detail page to another post, I can be more specific.

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [benedict] URL

By ross - May 29, 2009

Hi Benedict.

When you have the number in there at the end as well, that doesn't work? Basically, you just need to have the record number at the end of the URL and then you can have anything else in there that you like. For example:

detailPage.php?I AM ROSS-5 will still load record number 5 even though the title there has nothing to do with it.

Try putting in the number again (at the end). If that doesn't work, can you send me a link to the page you have this all happening on?

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/