Jump to content

Recommended Posts

Posted

Hello

I haven't looked as hard as I should before posting this, but I've posted it in case I can't find an answer here in the previous forum threads(?). I've seen that you can have a templated website, I believe using a php script. Is this a simple set up? With templated website, if you make a change to the index page, it will change all pages correspondingly, correct? Can this also be done with style sheets? I've also heard in Stomping The Search Engines, you can have rss feeds and have the articles automatically put on a new page on your site, so you can build many pages quickly and get a higher page rank because each page that is created will have the links to the home page, site map, etc. Has anyone done this? Would it be worth it, or would the bandwidth used get out of control?

Thanks in advance for any replies, I'll keep looking.

Posted

There are different ways of templating a website. I think Dreamweaver, for example, does some template system that never made sense to me where, yes, you could change the index page and everything else altered.

 

I tend to use PHP includes to create my own template system. Basically, I take any information that I want to appear on every page and save it in its own file. So I have files named things like header.php, navigation.php, and footer.php.

 

Then I create a basic HTML page that contains the information specific to that page. Where the header or navigation or footer information would go, I call it through PHP's include function, which looks like this:

 

><?php include('/home/cpanelname/public_html/includes/thefileiwant.php'); ?>

 

That one line will let me call in the specific file. Then if I ever need to update the navigation, I just edit navigation.php and all my pages will get the new information from that file. But in this system, I still make a unique HTML page for each page I want to have on my site.

 

Putting all your page information into a database offers another way to template pages, but that gets more complex because you need to code all the database queries. And not every site really needs to be in a database.

 

I recommend playing around with PHP include() for a while and seeing if that helps you at all. Just make sure to save your pages as .php instead of .html.

Posted

I do the same thing.

The header.php has everything up to the content for the page

and the footer has everything after the content

the header defines the layout and includes the menu.php

 

So with three files I can change the layout or menu

and the whole site changes

and of course you can have sub menus to include on some pages.

my basic template looks like this.

 

><?php
// add header and additional title
$page_title="home";
include $_SERVER['DOCUMENT_ROOT']."/header.php";
// begin main content
?>

<p>Content</p>

<p>More Content</p>

<?php
// end main content 
// add footer file 
include $_SERVER['DOCUMENT_ROOT']."/footer.php";
?>

 

Note the page title, the header displays the default title plue the page title.

Posted

I would agree with Don and owatagal. Sometimes it's just easier to make/use your own. And using PHP makes life pretty easy. :)

Posted

Hello

Thanks for the replies. I'm just starting to get into php, just bought a few videos about it which are on their way. Thanks for the script code to use, this is great place for help and information.

Posted

Yes, there are many ways to do it. I usually use the above methods but one thing I did on one site was pretty cool (I thought.)

 

I set up a file called page.php and in that page I have the header, footer and navbar. I also have an include that reads a filename from the URL used to access page.php and then goes out and includes that filename as content. All my links are like http://www.mytchsite.com/page.php?artichokes and then the page.php simply does the framework and loads the file "artichokes" into the center section.

 

It's like using includes for the header and footer, but backwards. It was fun learning how to do it and it makes the individual "content" pages look cleaner but in the end it's just another way to do something.

Posted
Yes, there are many ways to do it. I usually use the above methods but one thing I did on one site was pretty cool (I thought.)

 

I set up a file called page.php and in that page I have the header, footer and navbar. I also have an include that reads a filename from the URL used to access page.php and then goes out and includes that filename as content. All my links are like http://www.mytchsite.com/page.php?artichokes and then the page.php simply does the framework and loads the file "artichokes" into the center section.

 

It's like using includes for the header and footer, but backwards. It was fun learning how to do it and it makes the individual "content" pages look cleaner but in the end it's just another way to do something.

 

Hello

This is a bit off topic, but I recall in the Stomping the Search Engines course, it mentioned that pages that have a question mark in them were dynamically generated. Being as such, they wouldn't be spidered because they wouldn't be available when the spider visits the site. Is this true? The fact that a site is templated doesn't have anything to do with dynamically created content, correct? Unless it the content being created, not the header and footer?

Thanks

Posted

Not any more. Spiders can follow dynamic links as long as they are not tied to session id's or are overly complex.

 

True, templates have nothing to do with dynamically created content unless that is the method the template uses. Includes for headers and such are a different animal because the server builds the page before feeding it to the spider and the spider doesn't even have a way to know if it was a static page or built with PHP Includes.

 

In fact, even if the content is included, the same holds true... as long as you go to www.mytchsite.com/index.php (or similar filename, htm, html, etc) to get to the page it looks like a static page to the spider.

Posted

Also, if you are worried about the dynamic links still, you can play with .htaccess and ModRewrite so that the links LOOK static even though they aren't.

 

For example, I have a site where a URL might actually be

 

 

ht*p://mysite.com/blog/archives/index.php?date=2004-12-04&key=grapefruit

 

But the link I give visitors (and search engines) looks like:

 

ht*p://mysite.com/blog/archives/2004/12/04/grapefruit/

 

 

So if you wanted to try TCh-Jim's version of the template system, but didn't want the URL to look dynamic, it would be possible. I could probably help you set up a simple RewriteRule, or a post in the cPanel and site maintenance forum would get others to help as well.

 

 

 

Edit TCH-Bruce: Changed forum suggested from backend services to cPanel and site maintenance

Posted
Also, if you are worried about the dynamic links still, you can play with .htaccess and ModRewrite so that the links LOOK static even though they aren't.

 

For example, I have a site where a URL might actually be

ht*p://mysite.com/blog/archives/index.php?date=2004-12-04&key=grapefruit

 

But the link I give visitors (and search engines) looks like:

 

ht*p://mysite.com/blog/archives/2004/12/04/grapefruit/

So if you wanted to try TCh-Jim's version of the template system, but didn't want the URL to look dynamic, it would be possible. I could probably help you set up a simple RewriteRule, or a post in the cPanel and site maintenance forum would get others to help as well.

Edit TCH-Bruce: Changed forum suggested from backend services to cPanel and site maintenance

 

Hello

If the link didn't look dynamic, does that mean it would't appear dynamic to human eyes or to the spider bots as well? I'd just like to be sure that the spiders could follow it so I'd get credit for the link as far as backlinks to other pages within the site, etc. I'd love any help with a RewriteRule, but as of now, it'd be over my head. The videos should be here soon. I'm going to look at them and decide if I should just pay someone to create/modify scripts when I can afford to, or try my hand doing it.

Thanks

Posted (edited)

So far as I know, it looks static to the spiders as well as humans. Google links to the static version of the URL, not the dynamic one. And in my referral log the links show up as the static-looking one, not the dynamic one (which is good, because Awstats doesn't track dynamic URLs so far as I can tell).

 

But as TCH-Jim said, simple dynamic links are doing fine in search engines these days. Set your template up however you are most comfortable doing it, and if you want help rewriting links when you're done, let me know.

 

Bruce--thanks for the edit. I don't know what I ws thinking.

Edited by owatagal
Posted
So far as I know, it looks static to the spiders as well as humans. Google links to the static version of the URL, not the dynamic one. And in my referral log the links show up as the static-looking one, not the dynamic one (which is good, because Awstats doesn't track dynamic URLs so far as I can tell).

 

But as TCH-Jim said, simple dynamic links are doing fine in search engines these days. Set your template up however you are most comfortable doing it, and if you want help rewriting links when you're done, let me know.

 

Bruce--thanks for the edit. I don't know what I ws thinking.

 

To be sure that a dynamic link was being followed, picked, whatever, by the spiders, I could check the backlinks for a page after it's been crawled, correct? The Google bot doesn't count links that are below a PR 3, correct? So I'd have to get my pages up to a PR 3? Is there another service or site that shows backlinks to a page regardless of PR?

Thanks again

Posted
Is there another service or site that shows backlinks to a page regardless of PR?
Yeah, Google. :flex:

 

I just entered link:ford.com into Google and the top of the results returned was a PR1 blog site. Don't get caught up by the PR... it's not a useful guage of page importance to Google. Google certainly counts pages with less than PR3 but the "Link:" feature has pretty much always been broken in that it gives flakey results.

 

Now, if you want to see what's linked to you just enter into Google the search

+yourtchsite.+tld

so to see what's linked to TCH you could enter, as an example

+totalchoicehosting.+com

 

Just to put your mind at ease about dynamic links, I went to Google and put a bit of HP's disclaimer into it:

"Prices, promotions, specifications"

The 6th result returned on page 1 of the results was

www.ztgroup.com/Default.aspx?tabid=47&productID=10800

 

Apparently Google's not having any problems with dynamic pages ;)

 

Hope it helps!

Posted
Yeah, Google. :)

 

I just entered link:ford.com into Google and the top of the results returned was a PR1 blog site. Don't get caught up by the PR... it's not a useful guage of page importance to Google. Google certainly counts pages with less than PR3 but the "Link:" feature has pretty much always been broken in that it gives flakey results.

 

Now, if you want to see what's linked to you just enter into Google the search

+yourtchsite.+tld

so to see what's linked to TCH you could enter, as an example

+totalchoicehosting.+com

 

Just to put your mind at ease about dynamic links, I went to Google and put a bit of HP's disclaimer into it:

"Prices, promotions, specifications"

The 6th result returned on page 1 of the results was

www.ztgroup.com/Default.aspx?tabid=47&productID=10800

 

Apparently Google's not having any problems with dynamic pages ;)

 

Hope it helps!

 

Thanks, everyone

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

×
×
  • Create New...