WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: Smiffy81 on June 23, 2014, 05:28:21 PM

Title: Newbie creating template
Post by: Smiffy81 on June 23, 2014, 05:28:21 PM
Thanks for your response to previous post guys/gals.

So I have set up a web domain  :-D
I have managed to upload WB 2.8.3 successfully :-D

I wanted to template my new website so have spent the day doing it. I am completely new at coding so you guys will probably rofl when you see it!

I have upload my files to wb template folder and that is where I am failing miserably!

I copied the simple template index php and changed it to:


?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=<?php
   echo defined('DEFAULT_CHARSET') ? DEFAULT_CHARSET : 'utf-8'; ?>" />
   <meta name="description" content="<?php page_description(); ?>" />
   <meta name="keywords" content="<?php page_keywords(); ?>" />
   <?php include('header.php'); ?>

<div id="container">
<div id="content">
<div id="contentleft">
<h1> Welcome to Thomas Mews Ltd</h1>
<p> Blurb</p>
<p> Blurb1</p>
<p> Blurb2</p>
</div><!--contentleft-->

<?php include('sidebar.php'); ?>

</div><!--content-->
</div><!--container-->

<?php include('footer.php'); ?>

   <title><?php page_title('', 'Thomas Mew Ltd'); ?></title>
</head>

<body>

div id="header">
<a href=""><img src="images/logo.png" "alt=logo" /></a>
</div><!--header-->

<div id="navigation">
<ul>
<li><a href="home.php">Home</a></li>
<li><a href="aboutus.php">About Us</a></li>
<li><a href="construction.php">Construction</a></li>
<li><a href="landscapes.php">Landscapes</a></li>
<li><a href="contactus.php">Contact Us</a></li>
</ul>

</div><!--navig

</body>
</html>


I also copied the info php and put it all in to one folder which conisist of the header footer sidebar and the different pages. (don't know if I should post it all here?)

Does anyone have any suggestions please?

Thanks for you help (once again in advance)

Smiffy
Title: Re: Newbie creating template
Post by: instantflorian on June 23, 2014, 05:49:54 PM
No offense, but...

1.) Please give your postings a useful subject. "Me again" is not a useful subject. [I agreee. I changed topic subject (admin)]
2.) Please use the "#" button when posting code.
3.) If you're not familiar with at least a bit of HTML, you should gather some general knowledge of it (http://www.w3schools.com/html/DEFAULT.asp) BEFORE you're trying to build a template. It is also helpful to know some very simple PHP basics.
4.) Read.The.F...abulou s.Manual. There's a documentation how to build WB templates (http://www.WebsiteBaker.org/en/help/designer-guide/porting-an-existing-html-template.php).

So the "code" is you posted is either incomplete, broken or just crap.
- There are obviously missing some lines of php at the beginning ("?>" is the _closing_ php tag).
- All what comes after <?php include('header.php'); ?> until </head> seems to be misplaced.
- The navigation is hard coded instead of using the WB function show_menu.
- There's example text hard coded (blurb).
- Before "div id="header"> a "<" is missing.
And so on... -.-

Title: Re: Newbie creating template
Post by: crnogorac081 on June 23, 2014, 05:59:08 PM
you said you created template. can you Zip all files and attach here to see. We will give you some guidance how to code template.