none
Limit to number of files a dwt can link to? Problems with more than 20 RRS feed

  • Question

  • Here's an odd one...

    My wife is developing a smallish website for the swimming club she runs. She is using EW4 (free version) and has three dwt files, one is primary including banner and navigation etc which then flows down to two others with slightly different page structures.

    Now, having updated the primary.dwt and then saving it, it then says it is linked to 19 files and proceeds to update them properly irrespective of the sub dwt that is used on the page.

    So to the interesting/troubling part.  If we add another file (the 20th) then everything works fine BUT when we add the 21st file only the first 20 are updated and the last one is skipped. Adding further files doesn't make a difference, all files after the first 20 are skipped.  Interestingly the 20 seem to be being selected in alphabetical order i.e. those at the end of the alphabet are those that are skipped.  We have inserted a file into the middle of the list and sure enough another at the bottom is skipped.

    Any ideas why this might be (limitation in the free version maybe?) and any suggestions what to do about it?

    Thanks

    nd the other two flow down from the primary 

    Monday, January 19, 2015 10:59 PM

Answers

  • There is another, better solution to your wife's problem. Don't use separate DWTs to create the two different layouts.

    Put both layouts in the one DWT. In the main container of the page content, where you have the columns set, put the complete code for the layout of both types of layouts, one after the other. Style them in the external style sheet, as they normally are. Give the container for each DIV a different name.

    <div id="body-container">
     <div id="content-1-col">
      <div id="col1">
      <!-- Column one start -->
    <script src="js/ModDate.js"></script>
    <!-- #BeginEditable "content" -->
      blah blah blah...
    <!-- #EndEditable -->
      <!-- Column one end -->
      </div>
     </div>


    <div id="content-2-col">
      <div id="col1">
      <!-- Column one start -->
    <script src="js/ModDate.js"></script>
    <!-- #BeginEditable "content" -->
      blah blah blah...
    <!-- #EndEditable -->
      <!-- Column one end -->
      </div>
      <div id="col2">
      <!-- Column two start -->
    <!-- #BeginEditable "rightsidebar" -->
       blah blah blah...
    <!-- #EndEditable --> 
      <!-- Column two end -->
      </div>
     </div>
    </div>

    Now, here's the trick: you put one style statement for each DIV in the head of the page (where the auto-styles sometimes are now). Use the DISPLAY property to hide the div that you don't want on that page. Whatever you put there overrides the external style sheet (that's how CSS works). All you need are two styles in the header, either:

    Enter "none" in the div you want to hide...

    #content-1-col {display: none;}

    #content-2-col {display: ;}

    The above would display the two-column layout and hide the one-column.

    Or, comment out the div you want to display...

    <!-- #content-1-col {display: none;} -->

    #content-2-col {display: none;}

    This would display only the one-column layout and hide the two-column.

    Don't forget--all the regular styles are still applied from the external style sheet. The above 2 commands are the only thing she needs in order to do what she is now trying to do with the sub-DWTs.

    Cool, eh?


    A horse walks into a bar. The bartender asks "Why the long face?"
    "Because I was born into servitude and when I die my hooves will be used to make glue."
    It was at this point that the bartender realized he would not be getting a tip.

    • Edited by Bill Pearson Wednesday, January 21, 2015 5:26 AM
    • Marked as answer by Keith Alderton Thursday, January 22, 2015 8:58 PM
    Wednesday, January 21, 2015 5:13 AM

All replies

  • DWTs aren't designed to cascade (or nest). I've been participating in this forum for 6 years, and this is the first time I've heard of (as far as I can remember) anyone trying to do this.

    Remember (if I understand the process correctly)--she is telling only the main DWT to update the dependent pages. No command is being issued to the secondary DWTs to update any pages from them. DWT's are static code.

    She might try switching to ASP.NET for such things. Others may chime in on the way to do this in ASP.NET (I use it rarely). I doubt that includes (info in the Help files) for the two sub pages would work, but I haven't tried that. 

    It has nothing to do with the free version. The free version is identical to the former paid version, with all updates rolled in.


    A horse walks into a bar. The bartender asks "Why the long face?" "Because I was born into servitude and when I die my hooves will be used to make glue." It was at this point that the bartender realized he would not be getting a tip.

    Tuesday, January 20, 2015 5:02 AM
  • As Bill said, if by "one is primary including banner and navigation etc which then flows down to two others with slightly different page structures" you mean you are nesting DWTs, that is not supported.   If I recall correctly, in a pre-release of EW1 it briefly was, but it was dropped before EW was officially released, and that means it is definitely a hit or miss affair with trying to do that in later editions where it would never have been tested or intended.

    You can nest ASP.NET Master pages.

    You can put different includes in different pages that use the same DWT.  You can have different DWTs used on different pages.  You can have editable areas in a DWT that you don't put content in for some pages, which is one way of getting different page layout with the same DWT.   Etc.   ...But don't assume nesting DWTs will work correctly.  It will be hit or miss.

    Tuesday, January 20, 2015 2:32 PM

  • You can nest ASP.NET Master pages.

    Which, it might be noted, is not entirely straight-forward to do.


    ClarkNK, A.K.A. HomePage Doctor
    HomePageDoctor.com -- Database Tutorials
    Ownertrades.com -- Created with Expression, VWDExress, SQL Express, and ASP.NET
    Arvixe -- My favored web host

    Tuesday, January 20, 2015 3:35 PM
  • Nesting Master pages isn't complicated (assuming you understand the syntax of doing so: http://msdn.microsoft.com/en-us/library/x2b3ktt7(v=vs.140).aspx).  What does become more complex is referencing controls in code-behind at various levels of nesting. For a site with no asp.net coding (other than the use of Master pages), that wouldn't come into play, and that would be the case here. Of course, the OP would have to be hosted on a windows server running asp.net, and be willing to have the pages' extensions change to .aspx.

    More reasonable would be to use a combination of includes and DWTs and stick with HTML.

    Tuesday, January 20, 2015 9:10 PM
  • The nesting of the DWTs works just fine for what we need.  The following article described how to do it http://tutorials.studentwebserver.co.uk/ExpressionWebTutorial/nesting/default.aspx  We do not have the skills to get into asp.net and the above method worked just fine up to 20 files.

    For those interested the site is at http://www.sasanorth.org.uk/index.html . You will see that there are two templates, one for full width and one for two columns.  Clicking on the STO menu item and then going to the hovering over the ND Admin menu item shows a list of three items.  If one then click on the 'Meets' button and then hovers over the ND Admin button there are now four items.  The reason being that the top level dwt had the Meeting item added but it only updated some of (20 !) files when saved.  Hence the STO page was not updated.

    I'm happy with the way the dwts work but can't current get more than 20 to update if we change the top level.

    NB hopefully when some people find this we will have fixed it but as of today it is still broken


    Tuesday, January 20, 2015 9:45 PM
  • That link does not change that nested DWTs are not officially supported.  (That site uses EWD to refer to EW, which was an early name, Expression Web Designer; in short, it's not current information.)  If something you are doing runs into a limit inside EW, remember that EW would not ever have been tested for the condition you are hitting. We can't do anything to change that.

    If the 20 file limit is the only thing not working for you, create another set of DWTs for the 21st - 40th files, and maintain two sets.  It would still be better than editing each page individually.

    By the way, I did a quick search of other attempts at using nested DWTs, and someone else also hit the 20 pages updated, only, limit.  There was no resolution other than to not nest the DWTs.  In that case, includes were used instead, where common information was needed only in a subset of pages.
    • Edited by KathyW2 Wednesday, January 21, 2015 3:08 AM
    Wednesday, January 21, 2015 2:49 AM
  • There is another, better solution to your wife's problem. Don't use separate DWTs to create the two different layouts.

    Put both layouts in the one DWT. In the main container of the page content, where you have the columns set, put the complete code for the layout of both types of layouts, one after the other. Style them in the external style sheet, as they normally are. Give the container for each DIV a different name.

    <div id="body-container">
     <div id="content-1-col">
      <div id="col1">
      <!-- Column one start -->
    <script src="js/ModDate.js"></script>
    <!-- #BeginEditable "content" -->
      blah blah blah...
    <!-- #EndEditable -->
      <!-- Column one end -->
      </div>
     </div>


    <div id="content-2-col">
      <div id="col1">
      <!-- Column one start -->
    <script src="js/ModDate.js"></script>
    <!-- #BeginEditable "content" -->
      blah blah blah...
    <!-- #EndEditable -->
      <!-- Column one end -->
      </div>
      <div id="col2">
      <!-- Column two start -->
    <!-- #BeginEditable "rightsidebar" -->
       blah blah blah...
    <!-- #EndEditable --> 
      <!-- Column two end -->
      </div>
     </div>
    </div>

    Now, here's the trick: you put one style statement for each DIV in the head of the page (where the auto-styles sometimes are now). Use the DISPLAY property to hide the div that you don't want on that page. Whatever you put there overrides the external style sheet (that's how CSS works). All you need are two styles in the header, either:

    Enter "none" in the div you want to hide...

    #content-1-col {display: none;}

    #content-2-col {display: ;}

    The above would display the two-column layout and hide the one-column.

    Or, comment out the div you want to display...

    <!-- #content-1-col {display: none;} -->

    #content-2-col {display: none;}

    This would display only the one-column layout and hide the two-column.

    Don't forget--all the regular styles are still applied from the external style sheet. The above 2 commands are the only thing she needs in order to do what she is now trying to do with the sub-DWTs.

    Cool, eh?


    A horse walks into a bar. The bartender asks "Why the long face?"
    "Because I was born into servitude and when I die my hooves will be used to make glue."
    It was at this point that the bartender realized he would not be getting a tip.

    • Edited by Bill Pearson Wednesday, January 21, 2015 5:26 AM
    • Marked as answer by Keith Alderton Thursday, January 22, 2015 8:58 PM
    Wednesday, January 21, 2015 5:13 AM
  • Many thank KathyW2, at least I'm not going mad!
    Wednesday, January 21, 2015 10:00 PM
  • Bill, that's a great idea.  Thank you so much.  Until a month or so ago we hadn't even heard of DWTs and although I had heard of a CSS I had no real idea how to use it.  We are please with how far we have managed to get but neither of us are nor ever will be specialists so these peculiarities will always catch us out.

    Thank you all for your comments and help.  We'll have a crack at the single DWT approach with hidden divs.

    Wednesday, January 21, 2015 10:04 PM
  • Etiquette suggests that you mark the answer that helped you as the Answer. That way, people coming later (searching for the same issue) will know it's answered and the answer will appear right under your question, so people don't have to work too hard.

    I should note that my solution, above, has been around a while. It uses one benefit of CSS--you can style any part of the page in 3 places:
    An external style sheet (that all pages can access)
    Styles in the head section of individual pages (used in my solution)
    Inline styles used adjacent to the item being styles.

    Here's the important part--the closer the style is to the item being styled, the more "power" it has. A style in the head overrides the style for that object in the style sheet (but only on that page), and Inline styles override both (but only for the item it's adjacent to).

    As you can see, there is a benefit in keeping the head section free of any unnecessary things like auto-styles (in order to keep everything clean), but it's handy when you use it right.


    A horse walks into a bar. The bartender asks "Why the long face?" "Because I was born into servitude and when I die my hooves will be used to make glue." It was at this point that the bartender realized he would not be getting a tip.

    Thursday, January 22, 2015 4:25 AM