Jump to content

help with generagint a page


ikhan42

Recommended Posts

Hello Everyone,

 

Am new to this forum so let me start by saying hi.

 

I am doing a website for a firend of mine who runs an it business and he knows i dabble in HTML a bit and my wife is creative as far as design is concerned so he cashed in some chips and has asked if I can help him.

 

SO here we go. I have created a site for him using Drupal so he can manage the content easily, but one of the things he wants me to do is very tedious and I dont really want to create hundreds of pages as I beleive this can be done in a easier manner and not effect his SEO once the site goes online.

 

Basically he services all of Sydney and neighbouring suburbs and what he has asked me to do is to have a list of regions, and within those regions list the suburbs and when the suburb link is clicked it takes his clients to a page that mentions the suburb and a bunch of verbage for the services that are provided.

 

eg the customer clicks sydeny and the title of the page may be computer repairs sydney and then it would have a few paragraphs for example DO you live in the Sydney CBD and having issues with your computer, we can help you etc etc.

 

If the customer lives in Penrith the title would be the same as the previous title but the word sydney would change to penrith and the same would be true for the page content.

 

Is there a way to have these pages generated automatically by taking information from the lists and then injecting that info into the generated page by using a emplate or something.

 

Kind of like Microsoft does with its word templates when when you put in customer name it automatically inserts that name into its word templates.

 

Hope I am making sense and hopefully someone can help as my friend has been bugging me for a couple of months now.

 

Thanks

ikhan42

Link to comment
Share on other sites

Yes, it's definitely possible to make some sort of standard template and automate this process a bit. I personally don't know Drupal, so I can't really help with that, but it could be as simple as passing in the name of the city/suburb in the URL:

 

your domain.com/yourpage.php?city=cityname

 

and then the page would check the URL using $_GET and display that city within the page (with proper security measures in place to ensure that a visitor can't add code to the URL and potentially cause security issues.)

 

Alternatively, if you want to have separate pages rather than one single page that changes, you could potentially do something like yourdomain.com/cityname.php and then use PHP to get the file name and use that value within the page.

 

One thing to keep in mind though... if the city name is the only thing on the page that changes, and the rest of the page stays the same, that may or may not have SEO benefits. I'm pretty sure Google and other search engines actually mark you down for duplicate content like this.

Link to comment
Share on other sites

Hi Ben,

 

Yes I told him about the seo implications and he said that most of the IT companies are doing this and are ranking on page 1 in the top 3 positions in google, he believes this option will give him better coverage as most people will search based on where they live. Is there anywhere I can get some info on passing the name of the suburb in the URL?

 

Thanks for your help

ikhan42

 

Yes, it's definitely possible to make some sort of standard template and automate this process a bit. I personally don't know Drupal, so I can't really help with that, but it could be as simple as passing in the name of the city/suburb in the URL:

 

your domain.com/yourpage.php?city=cityname

 

and then the page would check the URL using $_GET and display that city within the page (with proper security measures in place to ensure that a visitor can't add code to the URL and potentially cause security issues.)

 

Alternatively, if you want to have separate pages rather than one single page that changes, you could potentially do something like yourdomain.com/cityname.php and then use PHP to get the file name and use that value within the page.

 

One thing to keep in mind though... if the city name is the only thing on the page that changes, and the rest of the page stays the same, that may or may not have SEO benefits. I'm pretty sure Google and other search engines actually mark you down for duplicate content like this.

Link to comment
Share on other sites

Hi Ben,

 

Yes I told him about the seo implications and he said that most of the IT companies are doing this and are ranking on page 1 in the top 3 positions in google, he believes this option will give him better coverage as most people will search based on where they live. Is there anywhere I can get some info on passing the name of the suburb in the URL?

 

Thanks for your help

ikhan42

 

Yes, it's definitely possible to make some sort of standard template and automate this process a bit. I personally don't know Drupal, so I can't really help with that, but it could be as simple as passing in the name of the city/suburb in the URL:

 

your domain.com/yourpage.php?city=cityname

 

and then the page would check the URL using $_GET and display that city within the page (with proper security measures in place to ensure that a visitor can't add code to the URL and potentially cause security issues.)

 

Alternatively, if you want to have separate pages rather than one single page that changes, you could potentially do something like yourdomain.com/cityname.php and then use PHP to get the file name and use that value within the page.

 

One thing to keep in mind though... if the city name is the only thing on the page that changes, and the rest of the page stays the same, that may or may not have SEO benefits. I'm pretty sure Google and other search engines actually mark you down for duplicate content like this.

Link to comment
Share on other sites

Is there anywhere I can get some info on passing the name of the suburb in the URL?

It shouldn't be that complicated. You'd just want to work with a URL like this:

 

yourdomain.com/yourpage.php?city=yourcity

 

and anywhere on the page that you want that city name to appear, you'd use

 

<?php echo htmlentities($_GET['city'], ENT_QUOTES); ?> 

The $_GET[] gets the data from the URL, and the htmlentities function ensures that someone can't pass code into the page through the URL.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...