Dynamic Web Templates and Metatags?


E

Eric G

Hello,

I have two questions pertaining to Dynamic Web Templates and Meta tags.

Attaching a DWT to a page affects the page's Meta tags. As I understand it, the page to which the DWT is attached "inherits" the Meta tags from the DWG. Looking at the code at the beginning of the page (before the body tag) of a page that has a DWT attached, one can see the following:


"<html>

<!-- #BeginTemplate "dwt/ template.dwt" -->

<head>
<!-- #BeginEditable "doctitle" -->
<title>This is the main page</title>
<!-- #EndEditable -->
<title></title>
<meta name="Title" content="This is my website .."


Consequently there are to sets of "Title" tags, the first one, in my example "<title>This is the main page</title>", the second "<title></title>".

The first one, is, I would say, rather obvious, as it is commented before and after and that's where I would put the page Title. But, should the second Title tag, always be left blank, or should this also be filled out?
I noticed that it's possible to fill out even this second tag, even though there is a warning about how to handle this.

The Meta tags are, as I said I see it, "inherited" from the DWG. Does this mean that you should have the same Meta tags on all pages that are attache to the DWT, or should each page's Meta tags be edit and filled out individually for best effect?

Grateful for any ideas.

Best regards,


Eric G
Stockholm, Sweden
 
Ad

Advertisements

R

Ronx

The second (empty) <title> tag should be deleted - there must be one, and
only one, title tag.

The other meta tags may be common among pages or different. keywords and
description tags must be different on every page (they reflect the content
of the page they are on).
Where different tags are required, place them in editable regions, use the
docTitle region as an example.
The page the DWT is attached to will inherit the meta tags from the DWT in
non-editable regions, and inherit the tags in editable regions ONLY IF the
tag does not already exist. If it does exist, the original will be
retained.

--
Ron Symonds (Microsoft MVP - FrontPage)
Reply only to group - emails will be deleted unread.


Hello,

I have two questions pertaining to Dynamic Web Templates and Meta tags.

Attaching a DWT to a page affects the page's Meta tags. As I understand it,
the page to which the DWT is attached "inherits" the Meta tags from the DWG.
Looking at the code at the beginning of the page (before the body tag) of a
page that has a DWT attached, one can see the following:


"<html>

<!-- #BeginTemplate "dwt/ template.dwt" -->

<head>
<!-- #BeginEditable "doctitle" -->
<title>This is the main page</title>
<!-- #EndEditable -->
<title></title>
<meta name="Title" content="This is my website .."


Consequently there are to sets of "Title" tags, the first one, in my example
"<title>This is the main page</title>", the second "<title></title>".

The first one, is, I would say, rather obvious, as it is commented before
and after and that's where I would put the page Title. But, should the
second Title tag, always be left blank, or should this also be filled out?
I noticed that it's possible to fill out even this second tag, even though
there is a warning about how to handle this.

The Meta tags are, as I said I see it, "inherited" from the DWG. Does this
mean that you should have the same Meta tags on all pages that are attache
to the DWT, or should each page's Meta tags be edit and filled out
individually for best effect?

Grateful for any ideas.

Best regards,


Eric G
Stockholm, Sweden
 
T

Tina Clarke

Eric G said:
Hello,

I have two questions pertaining to Dynamic Web Templates and Meta tags.

Attaching a DWT to a page affects the page's Meta tags. As I understand it,
the page to which the DWT is attached "inherits" the Meta tags from the DWG.
Looking at the code at the beginning of the page (before the body tag) of a
page that has a DWT attached, one can see the following:
The Meta tags are, as I said I see it, "inherited" from the DWG. Does this
mean that you should have the same Meta tags on all pages that are attache
to the DWT, or should each page's Meta tags be edit and filled out
individually for best effect?
No that's all wrong .. it's quite easy to keep your tags .. scrap all that
other title stuff it's not needed you need to PREPARE your site before using
a dwt on an old site btw.

Here is what your asking ... plus the links to the full tutorial which I
suggest you read it's in two parts.

http://www.outfront.net/tutorials_02/fp_techniques/dwt-1.htm
http://www.outfront.net/tutorials_02/fp_techniques/dwt-2.htm

"ATTENTION - I have outlined further information under the below headings
you should pay particular attention to the Head Tags and Scripts if you want
to retain your keywords and description Meta tags and any scripts for each
page.

~ Head Tags ( doctitle )
FrontPage will, by default add the following code to the title tag in Code
View.

<!-- #BeginEditable "doctitle" -->

<title>Page Title Here</title>

<!-- #EndEditable -->

Copy the editable code in Code View and encase it around the Keywords and
Description Meta tags, it should look like the following.

<!-- #BeginEditable "doctitle" -->

<title>Page Title Here</title>

<!-- #EndEditable -->

<!-- #BeginEditable "keywords" -->

<meta name="KEYWORDS" content="site keywords here">

<!-- #EndEditable -->

<!-- #BeginEditable "description" -->

<meta name="DESCRIPTION" content="site description here">

<!-- #EndEditable -->

This will preserve keywords and descriptions you ALREADY have in place on
your pages. If you want to change your title, keywords or descriptions you
can right click on the page and choose Page Properties or go to Code View
and do it manually.

WARNING: With a page that has a DWT attached you must not use FrontPage Meta
Tag addons to APPLY your tags, as they will change the editable regions
coding of the meta tags and the FrontPage DWT will assume you are trying to
change this and ask you to save or restore. You want to in fact keep your
original code with the editable meta tags around the meta's. Of course you
can use the Addons as a tool and copy and paste meta tag to code view or in
page properties General Tab for each Meta. The developers know about this
problem and are working to provide updates.

~ Scripts such as _JavaScript (scripting)
If you have any scripts within the head tags when you first attach a dwt to
a page it won't be preserved. So you must save it to a notepad file, attach
the dwt to a page, and then reinsert your script, thereafter it will be
applied to any subsequent attachments. Put the following code around each of
your scripts in the head tag.

<!-- #BeginEditable "scripting" -->

<!-- Scripting area here -->

<!-- #EndEditable -->

This is really useful for _JavaScript menus. Using these menus with a dwt
saves you a lot of time. There are issues however be sure to see the *
Troubleshooting section."

hth Tina


Tip now out is: Do you know how to Sort Text In A Table with FrontPage?
http://frontpage-tips.com/ - FrontPage Tips
They are primarily for FrontPage 2003 but will be good
for earlier versions too.
 
E

Eric G

Thank you Ron and Tina. You answered my questions, even though you're really agreeing with each other. I shall learn and implement your ideas in the weekend.

Once again, many thanks for your assistance.

Best regards,



Eric G
Stockholm, Sweden


Hello,

I have two questions pertaining to Dynamic Web Templates and Meta tags.

Attaching a DWT to a page affects the page's Meta tags. As I understand it, the page to which the DWT is attached "inherits" the Meta tags from the DWG. Looking at the code at the beginning of the page (before the body tag) of a page that has a DWT attached, one can see the following:


"<html>

<!-- #BeginTemplate "dwt/ template.dwt" -->

<head>
<!-- #BeginEditable "doctitle" -->
<title>This is the main page</title>
<!-- #EndEditable -->
<title></title>
<meta name="Title" content="This is my website .."


Consequently there are to sets of "Title" tags, the first one, in my example "<title>This is the main page</title>", the second "<title></title>".

The first one, is, I would say, rather obvious, as it is commented before and after and that's where I would put the page Title. But, should the second Title tag, always be left blank, or should this also be filled out?
I noticed that it's possible to fill out even this second tag, even though there is a warning about how to handle this.

The Meta tags are, as I said I see it, "inherited" from the DWG. Does this mean that you should have the same Meta tags on all pages that are attache to the DWT, or should each page's Meta tags be edit and filled out individually for best effect?

Grateful for any ideas.

Best regards,


Eric G
Stockholm, Sweden
 
Ad

Advertisements

E

Eric G

Hello Tina,

Sorry for the delay in replying, but it was more to it than I tought, Your
tutorial is very instructive and most helpful, I'm sure it i will be of
great help even in the future.

Thank you very much.

Best regards,


Eric G
Stockholm, Sweden
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Dynamic Web Templates 1
dynamic web template 1
dynamic web templates 2
Dynamic Web Templates 3
Dynamic Web Template 1
Dynamic Web Template 2
Dynamic Web Template 3
Dynamic Web Templates 3

Top