HighDots Forums  

Repeating Region Template Challenge

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Repeating Region Template Challenge in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
MindCrafter
 
Posts: n/a

Default Repeating Region Template Challenge - 07-10-2004 , 07:29 PM






A little background. . .
I am creating a complex template for a contribute edited website. Basically
I am trying to fool proof the template.
The template contains an optional region that generates a simple table based
menu.
The menu rotates a corrisponding layer.

http://www.mindcrafter.com/projects/devweb

In the template I have a "Edit \ Debug" mode settings to allow dynamically
positioned layers to be repositioned so that it they be easily edited in
contribute's design window.

The Problem:

Is there a way to have one non nested repeatable template reference another
repeatable template's actions?
e.g. The end user adds a new menu item. Automatically a new content layer is
created outside of the originator's repeat region.

I could nest the new layer in the Template Repeat region and set the default
absolute position in the Style tag.

Example:
<!-- TemplateBeginIf cond="FloatLayers == true" -->
<!-- TemplateBeginRepeat name="MenuRegion1" -->
<!-- Begin Menu HTML Code --><!-- Begin Menu HTML Code -->
<!-- Begin Layer HTML Code --><div style="position:
@@(DebugMode==true)?'absolute':relative)@@; left: 25px; top: 135px;"></div><!--
End Layer HTML Code -->
<!-- TemplateEndRepeat -->


The problem is that when the user sets the "Edit mode" to true,
the layer is not positioned in such a manner for the user to easily edit the
layer.
Another problem is that if I create a separate repeat template for the
content layer.


Example:
<!-- TemplateBeginRepeat name="FloatMenu" -->
<!-- TemplateBeginRepeat name="MenuRegion1" -->
<!-- Menu HTML Code --><!-- TemplateBeginRepeat name="MenuRegion1" -->
<!-- TemplateEndRepeat -->

<!-- Other HTML Code --><!-- End HTML Code -->

<!-- TemplateBeginIf cond="FloatLayers == true" -->
<!-- TemplateBeginRepeat name="ContentRegion1" -->
<!-- Begin Layer HTML Code --><div style="position:
@@(DebugMode==true)?'absolute':relative)@@; left: 25px; top: 135px;"></div><!--
End Layer HTML Code -->
<!-- TemplateEndRepeat -->
<!-- TemplateEndIf -->


The end user is forced to create the new layer, if the end user changes the
menu order, the related content layer will have to be manually changed as well.

Attached is the template code using the second methodology.

Any suggestions?





Reply With Quote
  #2  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Repeating Region Template Challenge - 07-11-2004 , 08:39 AM






Mind:

Quote:
Is there a way to have one non nested repeatable template reference
another
repeatable template's actions?
e.g. The end user adds a new menu item. Automatically a new content
layer is
created outside of the originator's repeat region.
No.

The template engine cannot create content de novo like that.

Quote:
The problem is that when the user sets the "Edit mode" to true,
the layer is not positioned in such a manner for the user to easily edit
the
layer.
What does this mean? Your debug mode can change much more than just the
layer's position style.

Quote:
Attached is the template code using the second methodology.
Your attachment doesn't come through into the NNTP forums....

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"MindCrafter" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
A little background. . .
I am creating a complex template for a contribute edited website.
Basically
I am trying to fool proof the template.
The template contains an optional region that generates a simple table
based
menu.
The menu rotates a corrisponding layer.

http://www.mindcrafter.com/projects/devweb

In the template I have a "Edit \ Debug" mode settings to allow
dynamically
positioned layers to be repositioned so that it they be easily edited in
contribute's design window.

The Problem:

Is there a way to have one non nested repeatable template reference
another
repeatable template's actions?
e.g. The end user adds a new menu item. Automatically a new content
layer is
created outside of the originator's repeat region.

I could nest the new layer in the Template Repeat region and set the
default
absolute position in the Style tag.

Example:
!-- TemplateBeginIf cond="FloatLayers == true" --
!-- TemplateBeginRepeat name="MenuRegion1" --
!-- Begin Menu HTML Code --><!-- Begin Menu HTML Code --
!-- Begin Layer HTML Code --><div style="position:
@@(DebugMode==true)?'absolute':relative)@@; left: 25px; top:
135px;"></div><!--
End Layer HTML Code --
!-- TemplateEndRepeat --


The problem is that when the user sets the "Edit mode" to true,
the layer is not positioned in such a manner for the user to easily edit
the
layer.
Another problem is that if I create a separate repeat template for the
content layer.


Example:
!-- TemplateBeginRepeat name="FloatMenu" --
!-- TemplateBeginRepeat name="MenuRegion1" --
!-- Menu HTML Code --><!-- TemplateBeginRepeat
name="MenuRegion1" --
!-- TemplateEndRepeat --

!-- Other HTML Code --><!-- End HTML Code --

!-- TemplateBeginIf cond="FloatLayers == true" --
!-- TemplateBeginRepeat name="ContentRegion1" --
!-- Begin Layer HTML Code --><div style="position:
@@(DebugMode==true)?'absolute':relative)@@; left: 25px; top:
135px;"></div><!--
End Layer HTML Code --
!-- TemplateEndRepeat --
!-- TemplateEndIf --


The end user is forced to create the new layer, if the end user
changes the
menu order, the related content layer will have to be manually changed as
well.

Attached is the template code using the second methodology.

Any suggestions?







Reply With Quote
  #3  
Old   
MindCrafter
 
Posts: n/a

Default Re: Repeating Region Template Challenge - 07-11-2004 , 02:14 PM



Murray,

RE: What does this mean? Your debug mode can change much more than just the
layer's position style.

I should call have called it "Edit Mode".

I have template parameters that let the content editor display floating or
hidden layers when they are creating / editing a webpage in Contribute 2.
If a layer is given an absolute position in DW any other layer in the page
will overlay the object. (For example the slidebar in the sample links below)
Making it hard to edit let alone read. Normally this isn't a problem in DW as
you can show/hide the layes in the Design Group|Layers tab.
Unfortunately with repeating regions they layers are not accessible. My
solution was to create am "Edit Mode" where the content editor can
enable/disable the absolute positioning and CSS visibility attributes.
There are conditional template expressions in key places in the layer's style
code to facilitate this.

Examlpe:
Floating Content Layer: Enabled:
<!-- TemplateParam name="FadingLayers" type="boolean" value="true" -->

Debug Mode Enabled:
<!-- TemplateParam name="ShowFadingLayers" type="boolean" value="true" -->

Template Layer Definition Code:
<div id="divFadeLayer@@(_index+1)@@" name="divFloatLayer@@(_index+1)@@"
style="position:@@((ShowFadingLayers == false)?'absolute':'relative')@@;
@@((ShowFadingLayers == false)?'display:none; filter:alpha(opacity=0;
-moz-opacity:0.0;':'')@@">

[l=Page in Normal Mode]http://www.mindcrafter.com/projects/DevWeb/Default.asp
[l=Page in Debug
Mode]http://www.mindcrafter.com/projects/DevWeb/Default-Debugmode.asp
[l=Link to
Template]http://www.mindcrafter.com/projects/DevWeb/DevWeb_Default_ASP_1.dwt.txt

The positioning issue is that if I use the above code with the content
layers nested in the menu's repeating template
region. When "Edit Mode" is enabled, I get either the overlap issue or the
design window is a mess and stretched to the right.
For myself this is not a problem, but the target client has no exprience
editing HTML. So the cleaner I can keep the template display the better.

MindCrafter
[l=www.mindcrafter.com]http://www.mindcrafter.com



Reply With Quote
  #4  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Repeating Region Template Challenge - 07-11-2004 , 02:43 PM



Yes - I see exactly what you are doing. I just meant that you can use
template expressions and parameters to control much more than a layer's
visibility. You can also control its position, as well, or any other aspect
of the layer's presentation. Could that help?

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"MindCrafter" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Murray,

RE: What does this mean? Your debug mode can change much more than just
the
layer's position style.

I should call have called it "Edit Mode".

I have template parameters that let the content editor display
floating or
hidden layers when they are creating / editing a webpage in Contribute 2.
If a layer is given an absolute position in DW any other layer in the
page
will overlay the object. (For example the slidebar in the sample links
below)
Making it hard to edit let alone read. Normally this isn't a problem in
DW as
you can show/hide the layes in the Design Group|Layers tab.
Unfortunately with repeating regions they layers are not accessible. My
solution was to create am "Edit Mode" where the content editor can
enable/disable the absolute positioning and CSS visibility attributes.
There are conditional template expressions in key places in the layer's
style
code to facilitate this.

Examlpe:
Floating Content Layer: Enabled:
!-- TemplateParam name="FadingLayers" type="boolean" value="true" --

Debug Mode Enabled:
!-- TemplateParam name="ShowFadingLayers" type="boolean"
value="true" --

Template Layer Definition Code:
div id="divFadeLayer@@(_index+1)@@" name="divFloatLayer@@(_index+1)@@"
style="position:@@((ShowFadingLayers == false)?'absolute':'relative')@@;
@@((ShowFadingLayers == false)?'display:none; filter:alpha(opacity=0;
-moz-opacity:0.0;':'')@@"

[l=Page in Normal
Mode]http://www.mindcrafter.com/projects/DevWeb/Default.asp
[l=Page in Debug
Mode]http://www.mindcrafter.com/projects/DevWeb/Default-Debugmode.asp
[l=Link to

Template]http://www.mindcrafter.com/projects/DevWeb/DevWeb_Default_ASP_1.dwt
..txt
Quote:
The positioning issue is that if I use the above code with the content
layers nested in the menu's repeating template
region. When "Edit Mode" is enabled, I get either the overlap issue or
the
design window is a mess and stretched to the right.
For myself this is not a problem, but the target client has no exprience
editing HTML. So the cleaner I can keep the template display the better.

MindCrafter
[l=www.mindcrafter.com]http://www.mindcrafter.com





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.