Editable regions above <html> tag in template

G

Guest

FrontPage 2003, Windows XP...

I've been trying to use templates for a new site, but I can't seem to get
content above the <html> tag to work.

I use asp include files at the top of the page to do some validation before
displaying html, and to redirect if necessary. Pages based on the template
look like so:

<!--#include virtual="/includes/security.asp-->
<html>
<!-- #BeginTemplate "templates/new_page_1.dwt" -->
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1" />
<!-- #BeginEditable "doctitle" -->
<title>New Page 1</title>
<!-- #EndEditable -->
....etc.

The problem is the section above the <html> tag appears as an editable
region, and the user can change this on any page based on the template. Any
updates to the master template page in that section are never applied to the
pages based on the template. Is there any way to lock this section down?

Sincerely,

Adam Lofstedt
 
G

Guest

I think you'd have to put the security include just after the <head> tag.

Your solution doesn't provide very much security, anyway. Because the DWT
and the pages that attach it need to be in the same Web site, anyone who can
update the pages can update the DWT as well.

Generally, you're better off putting the varible content in a database, and
not letting ordinary users change the site with FrontPage.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
G

Guest

Jim Buyens said:
I think you'd have to put the security include just after the <head> tag.

That stinks. Another major oversite/bug from MS.
Your solution doesn't provide very much security, anyway. Because the DWT
and the pages that attach it need to be in the same Web site, anyone who can
update the pages can update the DWT as well.

The security is not for authors, it is for internet users. For example, if
the user is not logged in (via a session variable), then we should redirect
them to a login page. I want to do this before I start sending html to the
browser, which is why I want to have the include before the <html> tag.

My authors know not to change the dwt, but I would like them to not
accidentally change non-editable regions in the inherited pages.

Anybody at Microsoft have a reason as to why templated content doesn't work
as expected above the html tag? Any workarounds?
 
T

Thomas A. Rowe

If it is above the <html> tag the only way for a author to access it is in code view.

DWTs mainly apply to working with page in normal view, which doesn't give access to content above or
below the <html> tags on a page.
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
J

Jim Buyens

If you write code like the following, no HTML will go to the browser.

<html>
<%
if Session("loggedin") <> "y" then
response.clear
response.redirect "login.asp"
response.end
end if
%>

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 

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

Top