![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| ||||
| ||||
|
|
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. |
|
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. |
|
Attached is the template code using the second methodology. |
|
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? |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
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 |
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |