master page and title tag

R

Rippo

Is it possible to turn off the title tag in the page directive when
using master pages?

We have got meta data and title defined in a content control and are
ending up with 2 title tags, one defined in our content and an emty one
defined by the page directive.

Can anyone help??
 
C

Cowboy \(Gregory A. Beamer\)

Have the content control talk to the page which then overwrites the title in
the page proper. The master page should always, from my understanding,
control the rendered page's header.
 
R

Rippo

Cowboy

If I override then I suppose I will need to remove the title tag from
the content control as well.
Therefore removing the title tag seems the best approach!

Have you point me to any code which allows me to override/remove the
title tag?
Thanks
 
V

vMike

Rippo said:
Cowboy

If I override then I suppose I will need to remove the title tag from
the content control as well.
Therefore removing the title tag seems the best approach!

Have you point me to any code which allows me to override/remove the
title tag?
Thanks
My approach to this is to have a master page class with a title property
(which uses page.title = xxx). In my content code I set this property (I
call it TitleText) as follows.

in content page ...
dim m as mgMasterPage = ctype(page.master, mgMasterPage)
m.TitleText = "Some title text "

Mike
 
R

Rippo

Mike

Unfortunetely my users use MACROMEDIA CONTRIBUTE to edit and create new
pages. All pages are based on a ASP.NET dreamweaver template. Within
the template is a dynamic content region with meta data and the page
title. This is the only way to allow contribute to edit the page title.
However all I want to do is to remove the title tag from the page
directive (or remove it from the rendered page) as I get to title tags.
One for contribute and an empty one added by .net

Rippo


- My approach to this is to have a master page class with a title
property
- (which uses page.title = xxx). In my content code I set this
property (I
- call it TitleText) as follows.
-
- in content page ...
- dim m as mgMasterPage = ctype(page.master, mgMasterPage)
- m.TitleText = "Some title text "
-
- Mike
 
V

vMike

Rippo said:
Mike

Unfortunetely my users use MACROMEDIA CONTRIBUTE to edit and create new
pages. All pages are based on a ASP.NET dreamweaver template. Within
the template is a dynamic content region with meta data and the page
title. This is the only way to allow contribute to edit the page title.
However all I want to do is to remove the title tag from the page
directive (or remove it from the rendered page) as I get to title tags.
One for contribute and an empty one added by .net
I am not familiar with macromedia or dreamweaver. If you want to override
the page render, you would use something like the following

Protected Overrides Sub Render(ByVal writer As HtmlTextWriter)

Dim _stringBuilder As StringBuilder = New StringBuilder()
Dim _stringWriter As StringWriter = New StringWriter(_stringBuilder)
Dim _htmlWriter As HtmlTextWriter = New HtmlTextWriter(_stringWriter)
MyBase.Render(_htmlWriter)
Dim html As String = _stringBuilder.ToString()
Dim start As Integer = html.IndexOf("<title)
if start <> -1 then
do your replacing of the html string here
end if

writer.Write(html)

End Sub

But I suspect that there is some other way to manipulate the dreamweaver
data or maybe change the template. Sorry I can't help you further.

Mike
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top