I wanna design a website template but wanna know how to include one header, footer and sidebars on whole website ? I want to make a file for header, one file for footer and so one file for right sidebar and one file for left sidebar. Now every time i need to change anything in header or footer or sidebar, i will just change that one file for example header file and it should be changed on whole site. I now i can do it by php include command but is it safe for seo ? as if i use include command for header, footer, right sidebar and left sidebar then every page will have four include. So will anyone plz tell me is there any way other than include and ifram ? and if i use many include on every page of website is it ok for seo ? Hope you understand what i wanna ask and will help. Thanks
Hello SHFAQ. Here you can find enough info: http:// forums digitalpoint com/showthread.php?t=390 I hope it helps.
you must do it in php <?php include 'header.php';?> <?php include 'sidebar.php';?> <?php include 'footer.php';?>
like LightGraphicz said, PHP include(); would be the best way to do it, I'd also suggest you learn PHP, it takes a few hours to get the hang of it, but once you do, it'll make EVERYTHING you ever do with websites easier.
first you design a website then, slice and cut into xhtml with css then, it moves to PHP, do programming then upload your website, then check your xhtml in validator, then test for seo, this are the steps, you can edit your website after upload to according to seo, few things main for seo, title tag, keywords, description, anchor tags, careful about this, and your site must be very light, if you are making flash website then your site must be under 35 - 40 kb and if its normal website then it must be 20-25 kb, i'm talking about home page file size. good luck !!
Here's another good thread, read Dan Schulz' posts: http://forums.digitalpoint.com/showthread.php?t=223056 Includes do not affect SEO at all. What your browser sees as far as HTML is what the bots see. They don't know how it got there, so it doesn't matter. Dan also addresses security a bit in that thread.
I have already read module docs and developed a hello_world module. The problem is I see left and right blocks and header-footer too. For example this module should print a demo javascript page, means just module content should transferred to browser nothing from blocks etc. I dont want to disable blocks or change template for whole site. ie: I want to prevent that ..< html >< head >... appears twice on that page <html> <head> ... some js for test </head> <body> ... some demo code </body> </html>
Thanks all guys for really helpfull reply as i already now how to use include command but i was in dout that is it good for seo and now you clear it that seo has no pain with includes. Thanks again Now will anyone plz tell me from where to start learning CSS from beginner to advanced, i now w3schools but i need something start simple to advanced and also which software is good to learn and implement CSS ?
Using a template system can affect SEO indirectly. I've worked on quite a few websites where the owners use a template file (or template files) but don't allow for unique page titles or meta descriptions (not that description tags help with seo...) I'm assuming that php and perl are the same in this respect, but if I'm wrong, somebody can correct me.... In the template file, you should at least make it so that your titles are unique. I do this by using a variable in the header file -- <html> <head> <title>$META_TITLE</title> <meta name="description" content="$META_DESCRIPTION" /> <style type="text/css" href="css.css" /> </head> <body> Code (markup): and then when I call the header, I define the variable before calling (including) the header: $META_TITLE = "Your Title Goes Here"; $META_DESCRIPTION = "Your meta description goes here"; &header; # like the <?php include 'header.php';?> Code (markup): Somebody who knows php should show you how to do this properly, though, if you're using php. I'm pretty sure that you can use template files for any server-side language, though -- Php, Perl, Asp, Python, etc.
You have pointed a very good issu rogan4567. For example i have one main page to hold contents and two static include pages named: Header and Footer Now what to do that search engines only crawl main page title, description and tags and dont get include files titles and description ?
If you're setting it up like I have outlined, the page title and meta description is only in the page that search engines access (your content page / home page). I'm below a php newbie, but I put this together to show you how it works. This may not be efficient, it may be in secure... I don't know... Header.php: <?php $HeaderFile = <<<HEADERFILE <html> <head> <title>$META_TITLE</title> <meta name="description" content="$META_DESCRIPTION"> </head> <body> HEADERFILE; echo $HeaderFile; ?> Code (markup): Index.php <?php $META_TITLE = "My Meta Title"; $META_DESCRIPTION = "My Meta Description"; include 'header.php'; ?> This is the HTML BODY </body> </html> Code (markup): This will result in a web page with the code looking like this to search engines / people (if they view the source code) index.php executed in a browser: <html> <head> <title>My Meta Title</title> <meta name="description" content="My Meta Description"> </head> <body> This is the HTML BODY </body> </html> Code (markup): Search engines won't know anything about your header.php or footer.php, they are invisible for all intents and purposes. If you want to have multiple web pages, though, all with different titles and meta descriptions, just use this: <?php $META_TITLE = "My Meta Title"; $META_DESCRIPTION = "My Meta Description"; include 'header.php'; ?> Code (markup): instead of this: <?php include 'header.php';?> Code (markup): But you'll have to modify the header.php to suit your needs, of course. Hopefully this helped as I'm not totally sure that I understood your last question.
Thanks rogan4567 dear for really helpfull reply but i cant understand some code plz explain it. In header file you add this code and i dont know its meaning. $HeaderFile = <<<HEADERFILE Code (markup): I also dont want that search engines get anything from include files but what if i want then search engine get data from my include left menu ?
I have already read module docs and developed a hello_world module. The problem is I see left and right blocks and header-footer too. For example this module should print a demo javascript page, means just module content should transferred to browser nothing from blocks etc. I dont want to disable blocks or change template for whole site. ie: I want to prevent that ..< html >< head >... appears twice on that page <html> <head> ... some js for test </head> <body> ... some demo code </body> </html>