DWT - 使身体标签可编辑的方法? [英] DWT - method for making the body tag editable?

查看:65
本文介绍了DWT - 使身体标签可编辑的方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在试图找出正确的方法(如果有的话)来制作< body>在DWT中标记可编辑区域。 显然我不想制作整个"身体"。可编辑的,只是开放的身体标签本身。 这是因为某些从属的
页面需要使用"onLoad"页面。要加载名为"初始化"的Javascript函数的项目,其他页面不会。

I'm trying to figure out the correct method (if there is one) to make the <body> tag an editable region in a DWT.  Obviously I don't want to make the entire "body" editable, just the opening body tag itself.  This is because some of the dependent pages will require the use of the "onLoad" item to load a Javascript function called "initialize", other pages won't.

为了准确,我可以直接放置通常的BeginEditable / EndEditable注释在"代码"视图中,在body标签的上方和下方。 那个
确实让我编辑相关页面中的正文标记以插入"onLoad"。 
但是,当稍后更新DWT并将更新传播到从属页面时,正文标记将还原原始表单和我的"onLoad"。编辑消失。

To be accurate, I can put the usual BeginEditable/EndEditable comments directly above and below the body tag while in Code view.  And that does let me edit the body tag in the dependent page to insert the "onLoad".  However, when the DWT is later updated and the update is propagated to the dependent pages the body tag reverts the original form and my "onLoad" edit disappears.

尝试将正文标记包装在可编辑区域时,看起来存在一些潜在问题。 当我点击"管理可修改区域"时查看DWT时按钮,我身体标签周围的手工编码区域不在列表中。 但是,正如
我所说,它被认为是依赖页面中的可编辑区域。

It looks like there's some underlying problem with trying to wrap the body tag in an editable region.  When I click the "Manage editable regions" button while viewing the DWT, my hand-coded region around the body tag isn't in the list.  But, as I said, it is considered an editable region in the dependent pages.

回答一些常见问题......是的,"维护使用元数据文件"在网站设置中检查框...使用Expression Web 3,刚刚安装了SP2 ...在Windows7下运行。

To answer some of the usual questions...Yes, the "maintain using metadata files" box is checked in Site Settings...Using Expression Web 3, just installed SP2...Running under Windows7.

这似乎是其他人试图做的事情,但我使用此论坛的搜索功能无法找到任何相关信息。 我们将非常感谢您提供的任何帮助。

This would seem to be something that others have tried to do, but I haven't been able to find any related information using this forum's search capability.  Any help you can offer will be greatly appreciated.

(我已经考虑过将"初始化"Javascript函数的"onLoad"作为DWT的永久部分的可能性然后定义"初始化"可编辑,但这似乎是一个相当麻烦的解决方法。)

(I've considered the possibility of making the "onLoad" of the "initialize" Javascript function a permanent part of the DWT and then make the definition of "initialize" editable, but that seems to be a rather kludgy workaround.)

推荐答案

你正在经历什么就是它的样子。 更新DWT会撤消相关页面中的任何正文标签编辑。

What you are experiencing is the way it is.  Updating the DWT undoes any body tag editing in the dependent pages.

我会认为,当您管理可修改区域时,EW不会向您显示可编辑的正文标记这一事实并不是真的将其视为一个。

I would take the fact that EW doesn't show you your editable body tag when you Manage Editable Regions as a hint that it doesn't really see it as one.

仅供参考,通常情况下,您可以在可编辑区域内包含完整的,通过结束标记,而不仅仅是开头标记你正在做< body>。

FYI, typically, you would include complete, opening through closing, tags inside an editable region, rather than just the opening tag as you are doing for the <body>.


这篇关于DWT - 使身体标签可编辑的方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆