Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • trfletch 598 posts 604 karma points
    Apr 08, 2010 @ 17:54
    trfletch
    0

    Changing date and republishing causes nested folders with Autofolders

    Hi all, I finally mananged to get Autofolders working but I do have an issue which I hope is resolvable. If I go into a node that has been put in a folder by Autofolders and change the date and re-publish then it gets put in a nested folder as follows which is obviously not what I want. Is there a way around this?

    News
         - 2010
                -April
                     - 08
                          - Article 1
                     - 2010
                          - March
                                   - 26
                                          - Article 2  (this article did have April 8th as a date but changed it to March 26th)      

    This is the config I am using:

    <?xml version="1.0" encoding="utf-8" ?>
    <settings>
      <folderProviders>
        <folderProvider alias="DateFolderProvider_Simple"
                assembly="/bin/AutoFolders"
                type="AutoFolders.Providers.DateFolderProvider">
          <property alias="MonthFormat">MMMM</property>
          <property alias="YearFormat">yyyy</property>
        </folderProvider>
        <folderProvider alias="DateFolderProvider_Full"
                assembly="/bin/AutoFolders"
                type="AutoFolders.Providers.DateFolderProvider">
          <property alias="DayFormat">dd</property>
          <property alias="MonthFormat">MMMM</property>
          <property alias="YearFormat">yyyy</property>
          <property alias="DateField">weekEnding</property>
        </folderProvider>
        <folderProvider alias="AlphaFolder"
               assembly="/bin/AutoFolders"
               type="AutoFolders.Providers.AlphaFolderProvider" >
          <property alias="UseUppercase">true</property>
        </folderProvider>
      </folderProviders>
      <autoFolders>
        <autoFolder docType="Newsarticle"
                 folderProviderAlias="DateFolderProvider_Full"
                 folderDocType="Newssection"
                 />
      </autoFolders>
    </settings>

     

  • trfletch 598 posts 604 karma points
    Apr 09, 2010 @ 15:49
    trfletch
    1

    I think I have now resolved this by adding the following code:

     rootFolders="//node[@level=2]" 

    as follows:

     <autoFolders>
        <autoFolder docType="Newsarticle"
                 folderProviderAlias="DateFolderProvider_Full"
          rootFolders="//node[@level=2]"
                 folderDocType="DateFolder"
                 />
      </autoFolders>
  • dandrayne 1138 posts 2262 karma points
    Apr 09, 2010 @ 16:08
    dandrayne
    0

    Are you using the "base" 4.03, as there is a problem with datepickers that I think caused this for me -> http://our.umbraco.org/projects/autofolders/general/7943-Many-nested-folders-created

  • trfletch 598 posts 604 karma points
    Apr 09, 2010 @ 17:47
    trfletch
    0

    Thanks for the reply Dan, I have already applied that fix.

Please Sign in or register to post replies

Write your reply to:

Draft