Link to home
Start Free TrialLog in
Avatar of JatinHemant
JatinHemantFlag for Rwanda

asked on

Error coming while saving Dreamweaver template...

Hi friends !

I am designing my website using HTML / Advance HTML and CSS. I am also using Server Side Includes for my webpages. That is why even there is no or less asp code , I am saving them with .asp extension as it is mandatory to save them with either .asp or .php extensions. Am I right ? (Please corrent me if I am worng)

As usual, the first challenge that comes in web development is "Design template". For this, I first coded a file named: temp.asp (THE CODE IS ATTACHED). I have configured my own webserver (kie.ac.rw) in my local testing machine using Microsoft IIS. DNS entries and all server configurations are ok.

When I browse to http://www.kie.ac.rw/temp.asp, I am able to see tha pages. (means server configurations and inclusion of INC files are correct.)

I want these sections in my template:

My template will have these sections.
1. Header (For banner)
2. Menu (Drop-down menu bar)
3. Top pane
4. Left pane
5. Right pane
6. Bottom pane
7. Footer (For footer)

Now, I opened this file temp.asp using Dreamweaver 8 and saved it as "general.dwt" template. When IIt stated that "there is no editable region", so I tried to make editable regions for Top, Left, Right and Bottom pane, but it when I do so, DW gives me a this warning message: (The screenshot is also attached)

********************************************************************************************************************
You have added or changed code outside the <html> tag. This change will not be copied to documents based on the template unless you insert this tag in the <head> section of your template.
<!--TemplateInfo codeOutsideHTMLIsLocked-"true"-->
********************************************************************************************************************

I ignored the message and continued making editable regions for my editable regions for Top pane, Left pane, Right pane and Bottom pane in this way:
********************************************************************************************************************
<!-- InstanceBeginEditable name="toppane" -->
         <div class="toppane">
         
         </div>
       <!-- InstanceEndEditable -->
     
         <!-- InstanceBeginEditable name="leftpane" -->
         <div class="left">
         
         </div>
       <!-- InstanceEndEditable -->
   
       <!-- InstanceBeginEditable name="rightpane" -->
         <div class="right">
      
       </div>
       <!-- InstanceEndEditable -->
********************************************************************************************************************
 I am also able to use the template to create webpages and it seems OK to me. But I am fear about that message. Why that message came ? Is there any thing wrong in my template code ?

Please help me in this regard.

Hemant




 
//The temp.asp file that I used to create the general.dwt template
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml">
 
<head>
 
<title></title>
<meta http-equiv="Content-Language" content="English" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="http://kie.ac.rw/style.css" media="screen" />
 
</head>
 
<body>
 
<div id="wrap">
 
   <div id="top">
   </div>
 
   <div id="content">
 
     <!--#include VIRTUAL="Templates/inc/header.inc"-->
 
     <!--#include VIRTUAL="Templates/inc/menu.inc"-->
 
     <div class="toppane">
     </div>
 
     <div class="left">
     </div>
		
     <div class="right">
     </div>
 
     <div class="bottompane">
     </div>
		
     <div id="clear">
     </div>
 
   </div>
 
   <div id="bottom">
   </div>
 
</div>
 
<!--#include VIRTUAL="Templates/inc/footer.inc"-->
 
</body>
 
</html>

Open in new window

warning.JPG
SOLUTION
Avatar of v2Media
v2Media
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JatinHemant

ASKER

Thanks for your reply.

You mean to say that if I use "Server Side Includes" to bring some INC files in particular areas of my webpages, then I MUST NOT save "temp.asp" as template "general.dwt" in DW. I should just use my temp.asp file (with INC inclusion) and rename it as temp.tpl.asp

Ok, I will follow your tips. BUT...

Just to clear my doubts, tell me why a software like DW 8 doesn't provide this support and what is wrong if I do it in the same way as I was doing, as I told you that though I am  getting that warning message, the alteration in general.dwt is reflecting in all the pages made with the template.

But as it seems to me that you have long experience, definately there may be some reasons you are saying to use this new method of using homepage.tpl, content.tpl, pop.tpl, utility.tpl, form.tpl etc. PLEASE EXPLAIN ME WHAT MAY BE THE FUTURE PROBLEMS IF I DON"T FOLLOW YOUR SUGGESTION AND USE THE SAME GENERAL.DWT METHOD !!!!!

In line to this please tell me whether it is also possible to put meta tags for "Keywords for searching" in a INC file. (How you do this ???) For example I have footer.inc and the contents of footer.inc are:

**************************************************************************************************************
<html>
<link rel="stylesheet" type="text/css" href="http://kie.ac.rw/style.css" media="screen" />

<div id="footer">
Kigali Institute of Education, P.O. Box 5039, Remera, Kigali, Rwanda<br/>
Copyright 2009 KIE - All rights reserved<br/>
Designed by <a href="http://www.kie.ac.rw">Hemant Uppadhyay, Webmaster, KIE</a>
</div>

</html>
**************************************************************************************************************

and I am calling the file in the code (In my first post) at the end of my temp.asp. All other INC files are made. I want to code only the inc file for "Keywords".

Please help me in this regard.

Thanks again,

Hemant
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Got your point.

You explained me in a nice way. I got everything except about keywords and desc tags. Would you please explain with some dummy code. What is that switch-->case terminology ?

I want these keywords in search engine:

KIE, Kigali Institute of Education, Educational Institute in Rwanda, Kigali Institute, KIE - Rwanda, Best educational institute in Rwanda, Courses in KIE

I want to make an include file (let it be meta.inc) for this so that I don't need to change it in all pages (same as header.inc, menu.inc, footer.inc)

How to code this inc file with keywords (I know basic way, I want to know professional way) and where in template, I should  put the <!--#include VIRTUAL="Templates/inc/meta.inc"--> statement.

Regards,

Hemant






SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for your quick reply. I got the switch-case statement

It is very nice hearing from you that you are a php coder. The one and last thing. As you can see in my code, for inclusion I used:

<!--#include VIRTUAL="Templates/inc/header.inc"-->

BUT, you have used php script and it is like this:

<? include('includes/meta.inc') ?>

I am little confused here. Please see the following link:
http://ask-leo.com/how_do_i_include_one_html_file_inside_another.html

Here, at this link you will find the SSI method for PHP. Then how it is different from your code ? Why there it is:
<? readfile("b.inc"); ?>

Also, would I have to change all the paths for INC (see Remote Includes on the same page) when I will really upload it to my ISP. As right now I will be using local test Apache, XAMPP or EasyPHP locally.

You also didn't use FILE or VIRTUAL !!!

Regards,

Hemant
Ok...for your kind information, I am also going to use .php extension as here everybody wants Open Source Technology.

So, our ISP also has Apache Servers and the .php extension will be compatible with Apache. That's why I want to know...

Why you used <? include('includes/meta.inc') ?> while in the link it is <? readfile("b.inc"); ?>          ???

Do they perform the same task ? And what to do when I will have to put it really on the ISP web server. Will it also work there ? Won't I have to use something like:

<? readfile("http://kie.ac.rw/includes/meta.inc"); ?>

Please help me as these things are confusing me.

Regards,

Hemant
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks again for your continuous and quick replies.

Well...let me go through the documentation.

Regards,

Heamant