Forum Moderators: open

Message Too Old, No Replies

Don't want Editible Regions in DW templates

Don't like 'em, don't need 'em - how to do without?

         

JayCee

3:21 am on Sep 18, 2004 (gmt 0)

10+ Year Member



For me the "Editible Regions" in Dreamweaver 2004 MX are a pain. Adding them to a template often fails to work correctly, moves tags around or adds tags or crashes the application (yes, i have the latest updates).

I use a menu system that has to be able to change the body tag (it does "onload" stuff). So one Editible Region must be outside the body tags - this seems to cause the problems.

1 time out of every 4 or 5 tries, i can get it to work and make a template with good Editible Regions - but then updating the template does not always update the pages made from that template. What's up with that?

Yet, if i create a template (.dwt file) with no Editible Regions, any new page created from it is locked.

Any ideas?

Do i have to make template pages complete "Library" items instead of using templates? Or what?

BTW, i'm asking in the Macromedia forum also, but there is so much knowledge here that i thought i'd try here as well.

Thanks all...

JayCee

4:46 am on Sep 18, 2004 (gmt 0)

10+ Year Member



Okay, further study here shows that i probably forgot that i can't change things in Editable Regions of the template and expect DW to change the child pages.

So that explains that part, user error :o

But is there a reliable way to include the body tag in an Editable Region, (DW MX 2004 7.0.1), so i can edit the navigation system for a different "default" (non-responsive) button for each child page?

Using Menu Magic II and really love how you can stop the button for the page you are on from working - if you can edit the body tag and other HTML nav code in the child pages.

sonjay

1:15 pm on Sep 18, 2004 (gmt 0)

10+ Year Member



First off, if you don't want to have any editable regions, then why are you even using a template? You want a site with 50 identical pages?

You can't make the actual body tag an editable region, but you can make an attribute of it editable. In your template document, select the body tag, then choose Modify -> Templates -> Make attribute editable. You'll get a list of the body tag's attributes. Choose which one you want editable (onload, it sounds like).

Now, in the individual child pages based on that template, you can edit the onload attribute by choosing Modify -> Template properties. In the dialog box that comes up, just enter whatever you want for the onload value, or make that field empty for no onload action. (You would end up with onload="" in the body tag, which doesn't hurt anything.)

JayCee

3:11 pm on Sep 18, 2004 (gmt 0)

10+ Year Member



Thanks sonjay!

Well, i DO want a template, if it works correctly. Guess i was venting a bit in my post title, sorry about that.

After more struggles i find that you have addressed the crux of the problem - can't make a body tag an Editable Region, and especially not if i also want sections inside the body tag to not be editable.

If my menu system was hand made, your solution would be great. But it is an application (DW Extension) and the body tag onload values (a pretty long string) are created programatically).

As usual, searching and studying the posts here at WebmasterWorld has suggested some work arounds :)

Usually i search first and post later, if needed. But this time i assumed (incorrectly) that there would not be much DW stuff at WebmasterWorld.

Seems like what i need to do is leave the body tag and the following dozen or so menu lines uneditable. This lets me make certain site-wide menu format and appearance changes that are not handled by the menu application.

Then, for the one time i need to make each page's menu different (to set the nav button for that page unoperable) i must "detach" the child page from it's template, run the menu program, then "reattach" to the template.

Have not tried this yet, but i think it will give me the best template. And i can use this work around any time i have to run the menu system again, which may be never on this site.

Will also be studying DW templates in more detail, to learn those possibilites i obviously missed, such as your cool solution.