Solved

How about putting meta tags in Dreamweaver MX

Posted on 2006-11-02
18
191 Views
Last Modified: 2013-11-19
I have some pages based in templates.
But I can't insert meta tags.
Where I have to put the matatags and how and how must the fileds be separated
0
Comment
Question by:vage78
  • 7
  • 4
  • 4
18 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 17860306
Hi vage78,

There are two ways to go about this.

One, you need to define an editable region in the head section of the template.  This will allow you place meta tags in the documents based on the template as well as javascripts.

If you don't want to take that approach, you can define the meta tags in the main template and use the "Make Attribute Editable" command to set those meta tags as definable by page (with a generic default value).  Once you apply the template, you then go to Modify | Template Properties and DW will prompt you to replace the default values with something of your choosing.
0
 

Author Comment

by:vage78
ID: 17864907
Hi iason
Can you please tell me step by step how doing with the first method.
How about define an editable region in the head section.
Do I have to make it in design mode or in character mode (code).
And after how I can put inside my meta tags. How the metatags must be separated??
0
 
LVL 29

Expert Comment

by:matrixnz
ID: 17880450
Hi Vage

Can you check your header to see if the following tag is in their <!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
If yes
Try the following
<!-- TemplateBeginEditable name="head" -->
<Meta....

<!-- TemplateEndEditable -->
Sometimes it's not very visible but as long as you type between --> and <!-- than it should work fine.  By default Dreamweaver adds this into the footer, so it should be their.

Cheers
0
 

Author Comment

by:vage78
ID: 17889029
Hi can you please be more specific with the second method?

lest say I have the followings key words
San Francisco
 Athens
 Sao Paolo
 greek companies
 italian companies
How must be the exact command?
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 17892164
Vage,

1. In code view for the .dwt file, look for the following (as matrixnz says) between the <head> and </head> tags

<!-- TemplateBeginEditable name="head" -->
(some code here, or maybe not)
<!-- TemplateEndEditable -->

If those Template commands are NOT in between the head tag somewhere, add them and save the .dwt file.

2. In your pages based on the template, you can now add any mtea tag by going to:

Insert | HTML | Head Tags | Keywords
0
 

Author Comment

by:vage78
ID: 17896975
Hi jason
I don't know if I have undestand clearly?
I have already an editable region but not inside the  <head> and </head> tags.
My editable region is in the body.

Do I Need to make a new editable region via code like this way: ??
<!-- TemplateBeginEditable name="head" -->
(some code here, or maybe not)
<!-- TemplateEndEditable -->

And something else how about putting key words?
lest say I have the followings key words
San Francisco
 Athens
 Sao Paolo
 greek companies
 italian companies
How must I put them inside the tags separated by comma, or something else?

Is there any good tutorial?

0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 17900039
>> Do I Need to make a new editable region via code like this way: ??

Yes, you need to make a second editable region in the head.  Just leave out the (some code here) part.

>> How must I put them inside the tags separated by comma, or something else?

If you follow my instruction above, you will enter the keywords separated by commas.

>> Is there any good tutorial?

Yes, tons.  Just Google for it.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:vage78
ID: 17905047
How can I insert an editable region inside <head> and </head> tags ?
If think only by using code . Am I right?
Or can I do so in design mode?
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 17908161
You can insert it by placing the cursor in the head section in code view and then clicking:

Insert | Template Objects | Editable Region

0
 

Author Comment

by:vage78
ID: 17912489
I have already donw what you said but nothing has changed - nothing has been added to my code.
What can I do?
0
 
LVL 29

Expert Comment

by:matrixnz
ID: 17912937
Hi Vage

Open your Template
Select Code View
In the header section use the following as a guideline, notice the <!-- TemplateBeginEditable name="doctitle" --><!-- TemplateEndEditable --> around the Title Tags and also <!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable --> around the meta tags

Hope that helps

Cheers

<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" -->
<meta name="keywords" content="keyword1,keyword2,etc..">
<meta name="description" content="Your Site description">
<!-- TemplateEndEditable -->
</head>

<body>

</body>
</html>
0
 

Author Comment

by:vage78
ID: 17914170
Is it the same making
Insert |HTML|Head tags ?? (by adding keywords,

I have tryied but I can't  see when I try to add more keywords. Everything is disappearead.
Why?

What about If I want to have different keywords and page descriptions in pages that are based on the same template? How Can I do so?
0
 
LVL 29

Expert Comment

by:matrixnz
ID: 17917531
Hi Vage

Are you editing the dwt file?  How many html pages do you have?  If only a few than I'd do the following

Backup your website via Windows Explorer.
Now Open Dreamweaver
Now create a new page from your current Template
Now click Modify - Templates - Detach from Template
Now click File - Save as Template... name it something different to your current Template
Now if you look in the header you should see that <!-- TemplateBeginEditable name="head" --> now exists
Add an Editable region around the TD or DIV in the main body etc.. and name it to content etc..
Resave the template.
Now Open all the pages you created previously
Create a new page from Template, select your new template
Copy and paste the contents of your other pages into the new page and save over the old page.
Do this for each page.

You should now be able to edit each of your metatags on each page.

Cheers
0
 

Author Comment

by:vage78
ID: 17945474
Hi matrixnz
I put the code in my template but metatags are outside the html code is it right?
Is it functioned or I have to put it via copy paste inside head tags???

Please have a look

<meta name="keywords" content="&#913;&#955;&#945;&#966;&#959;&#973;&#950;&#959;&#962; &#921;&#940;&#954;&#969;&#946;&#959;&#962;, &#932;&#945;&#960;&#949;&#964;&#963;&#945;&#961;&#943;&#949;&#962; &#917;&#960;&#943;&#960;&#955;&#969;&#957;, &#949;&#961;&#947;&#945;&#963;&#964;&#942;&#961;&#953;, &#949;&#961;&#947;&#945;&#963;&#964;&#942;&#961;&#953;&#959; &#964;&#945;&#960;&#949;&#964;&#963;&#945;&#961;&#943;&#945;&#962; &#949;&#960;&#943;&#960;&#955;&#969;&#957;, &#914;&#953;&#959;&#964;&#949;&#967;&#957;&#943;&#945;, &#949;&#960;&#953;&#963;&#954;&#949;&#965;&#941;&#962; &#949;&#960;&#943;&#960;&#955;&#969;&#957;, &#914;&#953;&#959;&#964;&#949;&#967;&#957;&#943;&#945; &#964;&#945;&#960;&#949;&#964;&#963;&#945;&#961;&#943;&#945;&#962; &#949;&#960;&#943;&#960;&#955;&#969;&#957;, &#917;&#960;&#953;&#963;&#954;&#949;&#965;&#941;&#962;, &#945;&#957;&#945;&#960;&#945;&#955;&#945;&#953;&#974;&#963;&#949;&#953;&#962; &#963;&#945;&#955;&#959;&#957;&#953;&#974;&#957;">
<meta name="description" content="&#917;&#961;&#947;&#945;&#963;&#964;&#942;&#961;&#953;&#959; &#932;&#945;&#960;&#949;&#964;&#963;&#945;&#961;&#943;&#945;&#962; &#949;&#960;&#943;&#960;&#955;&#969;&#957;. &#913;&#957;&#945;&#960;&#945;&#955;&#945;&#953;&#974;&#963;&#949;&#953;&#962; &#963;&#945;&#955;&#959;&#957;&#953;&#974;&#957; - &#913;&#957;&#964;&#953;&#954;&#945;&#964;&#940;&#963;&#964;&#945;&#963;&#951; &#964;&#945;&#960;&#949;&#964;&#963;&#945;&#961;&#943;&#945;&#962;. &#928;&#959;&#955;&#973; &#954;&#945;&#955;&#941;&#962; &#964;&#953;&#956;&#941;&#962;. &#924;&#949;&#947;&#940;&#955;&#951; &#960;&#959;&#953;&#954;&#953;&#955;&#943;&#945; &#965;&#966;&#945;&#963;&#956;&#940;&#964;&#969;&#957;.">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html><!-- InstanceBegin template="/Templates/start.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- #BeginEditable "doctitle" -->
<title> &#932;&#945;&#960;&#949;&#964;&#963;&#945;&#961;&#943;&#949;&#962;  &#917;&#960;&#943;&#960;&#955;&#969;&#957;  - &#913;&#955;&#945;&#966;&#959;&#973;&#950;&#959;&#962; &#921;&#940;&#954;&#969;&#946;&#959;&#962; &#919;&#955;&#953;&#959;&#973;&#960;&#959;&#955;&#951;</title>
<meta name ="keywords" content="&#964;&#945;&#960;&#949;&#964;&#963;&#945;&#961;&#943;&#949;&#962; &#949;&#960;&#943;&#960;&#955;&#969;&#957;, &#949;&#960;&#953;&#948;&#953;&#959;&#961;&#952;&#974;&#963;&#949;&#953;&#962; &#963;&#945;&#955;&#959;&#957;&#953;&#974;&#957;, &#945;&#957;&#964;&#953;&#954;&#945;&#964;&#940;&#963;&#964;&#945;&#963;&#951; &#964;&#945;&#960;&#949;&#964;&#963;&#945;&#961;&#943;&#945;&#962;, &#914;&#953;&#959;&#964;&#949;&#967;&#957;&#943;&#945;, &#949;&#961;&#947;&#945;&#963;&#964;&#942;&#961;&#953;, &#949;&#961;&#947;&#945;&#963;&#964;&#942;&#961;&#953;&#959;"/>
<meta name = "description" content = "&#917;&#961;&#947;&#945;&#963;&#964;&#942;&#961;&#953;&#959; &#964;&#945;&#960;&#949;&#964;&#963;&#945;&#961;&#943;&#945;&#962; &#949;&#960;&#943;&#960;&#955;&#969;&#957;  &#963;&#964;&#951;&#957; &#919;&#955;&#953;&#959;&#973;&#960;&#959;&#955;&#951;. &#924;&#949;&#947;&#940;&#955;&#951; &#960;&#959;&#953;&#954;&#953;&#955;&#943;&#945; &#963;&#967;&#949;&#948;&#943;&#969;&#957; &#954;&#945;&#953; &#967;&#961;&#969;&#956;&#940;&#964;&#969;&#957;. "/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-7"/>
<!-- #EndEditable -->

IS IT RIGHT ??
The first HTML line must be started with <HTML> or isn't necessary ??

0
 
LVL 29

Accepted Solution

by:
matrixnz earned 20 total points
ID: 17945639
No between the <head> and </head> tags if you look at the code I posted above this is how it should look so if I use your code above it would look something like.

<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- TemplateBeginEditable name="doctitle" -->
<title> &#932;&#945;&#960;&#949;&#964;&#963;&#945;&#961;&#943;&#949;&#962;  &#917;&#960;&#943;&#960;&#955;&#969;&#957;  - &#913;&#955;&#945;&#966;&#959;&#973;&#950;&#959;&#962; &#921;&#940;&#954;&#969;&#946;&#959;&#962; &#919;&#955;&#953;&#959;&#973;&#960;&#959;&#955;&#951;</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" -->
<meta name="keywords" content="&#913;&#955;&#945;&#966;&#959;&#973;&#950;&#959;&#962; &#921;&#940;&#954;&#969;&#946;&#959;&#962;, &#932;&#945;&#960;&#949;&#964;&#963;&#945;&#961;&#943;&#949;&#962; &#917;&#960;&#943;&#960;&#955;&#969;&#957;, &#949;&#961;&#947;&#945;&#963;&#964;&#942;&#961;&#953;, &#949;&#961;&#947;&#945;&#963;&#964;&#942;&#961;&#953;&#959; &#964;&#945;&#960;&#949;&#964;&#963;&#945;&#961;&#943;&#945;&#962; &#949;&#960;&#943;&#960;&#955;&#969;&#957;, &#914;&#953;&#959;&#964;&#949;&#967;&#957;&#943;&#945;, &#949;&#960;&#953;&#963;&#954;&#949;&#965;&#941;&#962; &#949;&#960;&#943;&#960;&#955;&#969;&#957;, &#914;&#953;&#959;&#964;&#949;&#967;&#957;&#943;&#945; &#964;&#945;&#960;&#949;&#964;&#963;&#945;&#961;&#943;&#945;&#962; &#949;&#960;&#943;&#960;&#955;&#969;&#957;, &#917;&#960;&#953;&#963;&#954;&#949;&#965;&#941;&#962;, &#945;&#957;&#945;&#960;&#945;&#955;&#945;&#953;&#974;&#963;&#949;&#953;&#962; &#963;&#945;&#955;&#959;&#957;&#953;&#974;&#957;">
<meta name="description" content="&#917;&#961;&#947;&#945;&#963;&#964;&#942;&#961;&#953;&#959; &#932;&#945;&#960;&#949;&#964;&#963;&#945;&#961;&#943;&#945;&#962; &#949;&#960;&#943;&#960;&#955;&#969;&#957;. &#913;&#957;&#945;&#960;&#945;&#955;&#945;&#953;&#974;&#963;&#949;&#953;&#962; &#963;&#945;&#955;&#959;&#957;&#953;&#974;&#957; - &#913;&#957;&#964;&#953;&#954;&#945;&#964;&#940;&#963;&#964;&#945;&#963;&#951; &#964;&#945;&#960;&#949;&#964;&#963;&#945;&#961;&#943;&#945;&#962;. &#928;&#959;&#955;&#973; &#954;&#945;&#955;&#941;&#962; &#964;&#953;&#956;&#941;&#962;. &#924;&#949;&#947;&#940;&#955;&#951; &#960;&#959;&#953;&#954;&#953;&#955;&#943;&#945; &#965;&#966;&#945;&#963;&#956;&#940;&#964;&#969;&#957;.">
<!-- TemplateEndEditable -->
</head>
<body>

</body>
</html
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now