Skip navigation
Currently Being Moderated

Deploy template across multiple sites

Jul 1, 2012 2:50 AM

I have a very large site (www.newwoodworker.com) that has gotten very big and to make it more manageable to keep up I broke it down into sub sites within the major one. The sub sites are in folders within the main site directory, for instance the Tool Reviews are in a separate site in the reviews folder within the primary site.

 

Is there a way to deploy a single template to all of the sites? I am looking at using a fluid layout template if that matters in this.

 
Replies 1 2 Previous Next
  • Currently Being Moderated
    Jul 1, 2012 4:17 AM   in reply to newwoodworker

    When you say "separate site" what do you mean?

    If you connect to the parent site, can you get at all of the files in all of the "sub sites" from that parent site's root folder?  If so, then one template could work for all of the files.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2012 4:32 AM   in reply to newwoodworker

    If, by connecting to the main site you can see all of the files/folders that make up the site, then a single template will work fine.  If your sub sites were in folders that were NOT within the main site's root folder, then a single template would not work.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2012 4:55 AM   in reply to newwoodworker

    I think I have miss spoken. I just went to try the linking and while all of the folders are int he root directory of the site, they are not within the main site folder. the sub sites are in their own folders, within the root directory of the site.

     

    Now you are confusing me because it sounds like you are saying the same thing in both instances.  The root folder *IS* the main folder of the site.  A single template will work with any file in any folder that is within the root folder of the site.  But just to be sure, show me a path to your local site's root folder, and then a path to one of your local sub site's 'root' folder.

     

    Looking at your site, I can see that this index.html file is located within a folder called "basic" (http://www.newwoodworker.com/basic/index.html), and this index.html file is within a folder called "ref" (http://www.newwoodworker.com/ref/index.html), both of which are within the root of the site.  It seems you are over-thinking this simple and fairly common arrangement.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2012 5:07 AM   in reply to newwoodworker

    Show me the paths to each local sub site's 'root' folder, and the path to the main site's local root folder.  It's as simple as that.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2012 5:26 AM   in reply to newwoodworker

    Please show me the path to your folders.  That's all I need to see to answer your question.  Don't try to describe it to me.  Just tell me how to get from the top level of your hard drive to each of these locations.

     

    COMPLETE THIS FORM:

    The path to my main site's root folder is...

    The path to my basic site's root folder is...

    The path to my reference site's root folder is...

     

    Got it?

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2012 5:41 AM   in reply to newwoodworker

    No - that's not what I asked for.  Show me the path from the root of your local hard drive to the various folders mentioned.

     

    DW's templates ONLY function within DW to manage your LOCAL files.  To answer your question of whether you can use a single template to manage all of the files in your site, I need to know what the path is to each of these groups of files.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2012 5:50 AM   in reply to newwoodworker

    In your site definition, is NWWSITES the local root folder?  If it is, then you can use one template.  If it's not, then you cannot use one template.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2012 6:03 AM   in reply to newwoodworker

    When you look at the site definition for the NWW site, is NWWSITES the root folder?  It doesn't sound like it is.  In that case you have shot yourself in the foot because you have taken a simple file architecture and made it much more complex.  As it is now, to link from a file in the BASIC folder to a file at the root level of the site you must use an absolute link reference (which will not be maintained by DW in the event that you move, or rename that linked file).  In addition to making link management more difficult you have eliminated the possibility of managing all your files with a single template.  I don't think this was a very good plan....

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2012 7:01 AM   in reply to newwoodworker

    Well, you would have to be careful.  The problem is that you will have a "Templates" folder within the NWW folder which would now no longer be the root of the site.  Can you upload that folder to the website and post a link to it so that I can examine the link structure?

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2012 7:37 AM   in reply to newwoodworker

    You have some choices here.  Are the files in the sub sites also controlled by their own templates?

     

    If not, then perhaps the easiest way to manage this would be to use FINDER/EXPLORER (i.e., NOT DW) to move each sub-site folder into the NWW root.  On going back into DW and refreshing your Files panel, you should see all of the files/folders.  Document relative links without those folders should still work.  Root relative links will not and should be fixed by you.  Are you with me to this point?

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2012 9:12 AM   in reply to newwoodworker

    First, make a complete backup of the site as it sits now (from NWWSITES down, i.e., copy the NWWSITES folder and paste it somewhere safe).

    If I jsut drag/drop the sub sites into the root NWW folder and then start dreamweaver, will it try to update any of the links on the individual templates?

     

    DW willl then only recognize the template that sits in the Templates folder at the root of the site.  The subsite templates will no longer be used as templates. 

     

    Now tell me - how do the subsite templates differ from the main site template?  Is it not at all, or a little bit, or lots?

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2012 10:01 AM   in reply to newwoodworker

    OK - that's good.  Then proceed with the moving.  Then you'll have to go into each subsite and check all the links.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2012 10:03 AM   in reply to MurraySummers

    Actually, let DW do this for you.  Instead, with all files closed, do a series of Find and Replace steps, one for each subsite.  In sequence, search for each subsite template name (e.g., subsite1.dwt), and replace with your main site template name.  One by one, this will bring all subsite pages under the control of your main template.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2012 12:10 PM   in reply to newwoodworker

    As soon as you move the subsite folders into the main site folder, the existing subsite templates will be disabled since they are no longer in the Templates folder at the root of the site.  And yes you run the F&R within DW.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 2, 2012 5:32 AM   in reply to newwoodworker

    Make sure you have uploaded all related files.  It appears that your boilerplate.css, newlogo.gif, nwwtmplt.css and respond.js files are not found by this page.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 2, 2012 6:41 AM   in reply to newwoodworker

    The files mentioned are not in the Templates folder.  in fact, nothing should be in the Templates folder other than the templates themselves (i.e., *.dwt files).  And in fact again, there is no benefit in uploading the Template folder anyhow since the template files have no function on the server - only working while you are actually in DW working on your local site.  Find the files that I have listed in your local site and upload them!

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 2, 2012 8:57 AM   in reply to newwoodworker

    the respond.js file also, is in the templates folder where DW must have put them.

     

    DW will not put those files in the Templates folder.  If they are in there, you must have inadvertantly done something that placed them there. 

     

    I don't know what you are doing wrong, but your links to these files are screwy.  THis is the code on the page you have uploaded -

     

    <link href="boilerplate.css" rel="stylesheet" type="text/css">

    <link href="nwwtmplt.css" rel="stylesheet" type="text/css">

    The links are looking for those files at the same folder level as the page.  Yet you are telling me that they are in other folders.  When you moved these files did you use DW's Files panel to do so?

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 2, 2012 10:39 AM   in reply to newwoodworker

    WHen you save it as a template file are you using FILE > Save As, or are you using FILE > Save As Template...?  The former won't work properly.  The latter will automatically put the template file into the Templates folder.

     

    When you make the links to the dependent files, are you browsing to find the linked file or are you making those links manually?

     
    |
    Mark as:
1 2 Previous Next

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points