Copied to clipboard

Flag this post as spam?

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


  • GP 16 posts 46 karma points
    Oct 18, 2012 @ 14:45
    GP
    0

    How to set the autofolders.config

    I'm trying to get AutoFolder working on my umbraco 4.9. I've red 100 times the documentation at http://our.umbraco.org/projects/developer-tools/autofolders and yet i can't figure out how to set the autofolders.config. No matter what i do to the autofolders.config , the content tree allways remain the same. What I want is that everytime a news (type doc News Item) is added the news is added to a sub folder named "MM-yyyy". I've tried different solution but none of them worked. I assumed that the new schema is this http://our.umbraco.org/media/wiki/5535/633902467497320000_AutoFolders1-3-Settings.png and the old schema is the one included in the download package (see the xml at the bottom of this post). I post here my content tree and my last configuration of autofolders.config.

    does anyone know, giving these documents types, how to set the autofolders.config ?

    this is how I set my autofolders.config

    <?xml version="1.0" encoding="utf-8" ?>
    <settings>
      <folderProviders>
        <folderProvider alias="settings1"
                assembly="/bin/AutoFolders"
                type="AutoFolders.Providers.DateFolderProvider"
            <property alias="FolderDocType">DateFolder</property>3
            <property alias="MonthFormat">MM</property>
            <property alias="YearFormat">yyyy</property>
        </folderProvider>
    </folderProviders>
    <DocTypes>
        <DocType alias="News Item" folderProvider="settings1"/>
      <DocTypes>


    -------------------------------------------------------------

    WHAT I SUPPOSE IS THE OLD SCHEMA
    </settings>

    <?xml version="1.0" encoding="utf-8" ?>
    <settings>
      <folderProviders>
        <folderProvider alias="DateFolderProvider_Simple"
                assembly="/bin/AutoFolders"
                type="AutoFolders.Providers.DateFolderProvider">
          <property alias="MonthFormat">MM</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">MM</property>
          <property alias="YearFormat">yyyy</property>
          <property alias="DateField">MyReleaseDate</property>
        </folderProvider>

        <folderProvider alias="AlphaFolder"
               assembly="/bin/AutoFolders"
               type="AutoFolders.Providers.AlphaFolderProvider" >
          <property alias="UseUppercase">true</property>
        </folderProvider>

        <!-- EXAMPLE PROPERTY FOLDER PROVIDER

        <folderProvider alias="PropertyFolder"
            assembly="/bin/AutoFolders"
            type="AutoFolders.Providers.PropertyFolderProvider" >
            <property alias="UseUppercase">false</property>
            <property alias="PropertyName">area</property>
            <property alias="DefaultFolderName">Default</property>
        </folderProvider>

        -->
      </folderProviders>

      <autoFolders>
        <autoFolder docType="Standard"
                 folderProviderAlias="DateFolderProvider_Simple"
                 folderDocType="DateFolder"
                 />
       
        <autoFolder docType="Standard_FullExample"
                 folderProviderAlias="DateFolderProvider_Full"
                 rootFolders="//* [@isDoc and @level=2]"
                 folderDocType="DateFolder"
                 truncatedFolderUrl="folder-1/folder-2/newsitems"
                 />

        <!-- EXAMPLE PROPERTY FOLDER IMPLEMENTATION
        <autoFolder docType="Property"
            folderProviderAlias="PropertyFolder"
            folderDocType="PropertyAreaFolder"
            rootFolders="//* [@isDoc and name() = 'PropertyArea']" />

        -->

      </autoFolders>

    </settings>

  • Jacob Phillips 34 posts 84 karma points
    Nov 07, 2012 @ 00:33
    Jacob Phillips
    0

    Are you sure this package is compatible with 4.9? Did you get it working? I need it too.

  • GP 16 posts 46 karma points
    Nov 07, 2012 @ 11:33
    GP
    0

    No I didn't, as you pointed out it is most likely not compatible with the 4.9. I got something similar to autofolders instead  by using this package http://our.umbraco.org/projects/developer-tools/datefolder. It works but it is less configurable than AutoFoldes.

    Yuo may also want to try this http://our.umbraco.org/projects/backoffice-extensions/falm-tabular-folder-browser. I have installed it and it works beautifully with Datefolder.

  • Jacob Phillips 34 posts 84 karma points
    Nov 07, 2012 @ 20:36
    Jacob Phillips
    0

    I stumbled across the fact that there are two, "Date folder" and "Date Folders"

    http://our.umbraco.org/projects/developer-tools/datefolder

    http://our.umbraco.org/projects/developer-tools/datefolders

    I'll try the former...thanks for your recommendation, and thanks for the tabular browser suggestion.

  • GP 16 posts 46 karma points
    Nov 08, 2012 @ 11:17
    GP
    0

    I tried to use "Date Folders" but it didn't work.

  • jacob phillips 130 posts 372 karma points
    Nov 08, 2012 @ 18:55
    jacob phillips
    0

    How strange, I couldn't get "Date Folder" to work, so I tried "Date Folders"in my 4.9.1 clean installation.

    The existing nodes subject to this package (identified in appSettings in web.config per the config notes for "Date Folders") errored when I tried to save & publish them, but newly created nodes did work. Ok for moving forward I guess.

    However, "Date Folder" package notes say "You can even move your existing content to datefolders." This is so important since existing production site has tens-of-thousands of nodes using "Auto Folders" which has a problem such that, when you first create a node, set the date, then save and publish, the content tree in back office has to be manually refreshed (reload nodes), and the node has to be reselected, otherwise additional save & publishes in that session don't get saved in the new path to the node under the date folders...

    Damn, I just realized, "Date Folder" will probably not work on existing production site which is an old 4.0.4.2 site on .NET 2

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 08, 2012 @ 19:29
    Jan Skovgaard
    0

    Hi guys

    This package is compatible with 4.9 - we've just finished of work on a 4.9 install that makes use of this package.

    Just to be clear - the XML in the autofolders.config file has nothing to do with the XML schema of Umbraco. The XML definition in autofolders.config is only consumed by this package and nothing else.

    In our implementation we have this in the <autoFolders> section

    <autoFolders>
        <autoFolder docType="News"
    folderProviderAlias="DateFolderProvider_Simple"
         folderDocType="DateFolder"
         />
    </autoFolders>

    News is the doctype that is being created in the "DateFolder", which is the autofolder document type.

    This is working like a charm - be aware that this creates a structure like this

    Year
       Month
         News
         News
         News
         etc.
       Month
         News
         News
         News
         etc.

    Hope the above example makes sense.

    /Jan

  • GP 16 posts 46 karma points
    Nov 08, 2012 @ 20:31
    GP
    0

    thanks Jan for the infomation.. as soon as I get some time I'll try again to get it to work.

    @Jacob:
    I think that "Date Folder" needs the doc type DateFolder in order to work. is there in your installation? the reason why I ask you that is that I'm not 100% sure tha the package installs it.
    and  Yes, in my installation it did move all the existing contents to subfolder..

     

     

     

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 08, 2012 @ 20:40
    Jan Skovgaard
    0

    Hi GP

    I can confirm that you need to create a document type for the date folder.

    It can be named anything you like since it's just a document type that is used to create the desired folder structure.

    You can call it "Date" you can call it "DateFolder", "DateStructure" or whatever you fancy.

    When you have created the folder it's important that you reference the correct alias for the folder in autofolders.conig file.

    In my example above the document type alias for my folder is "DateFolder", which you can see in the folderDoctype attribute. It's important that you reference the alias of the document type. Not the name.

    Just to be on the safe side, please touch the web.config file when you have modified the autofolders.config file.

    Looking forward to hearing from you when you have tried this out tomorrow.

    /Jan

  • GP 16 posts 46 karma points
    Nov 09, 2012 @ 17:23
    GP
    0

    Hi Jan. thank you.
    I haven't had time today..I'll let you know in the next days.
    Can you plese post here your entire autofolders.config. It would  be very helpfull.
    thank you

    GIan Paolo

     

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 09, 2012 @ 18:49
    Jan Skovgaard
    0

    Hi Glan

    This is what our autofolders.config file looks like. I've highlighted the places where I've added something to the default.

    <?xml version="1.0" encoding="utf-8" ?>
    <settings>
      <folderProviders>
        <folderProvider alias="DateFolderProvider_Simple"
                assembly="/bin/AutoFolders"
                type="AutoFolders.Providers.DateFolderProvider">
          <property alias="MonthFormat">MMM</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">MM</property>
          <property alias="YearFormat">yyyy</property>
          <property alias="DateField">MyReleaseDate</property>
        </folderProvider>
        <folderProvider alias="AlphaFolder"
               assembly="/bin/AutoFolders"
               type="AutoFolders.Providers.AlphaFolderProvider" >
          <property alias="UseUppercase">true</property>
        </folderProvider>
        <!-- EXAMPLE PROPERTY FOLDER PROVIDER
    <folderProvider alias="PropertyFolder"
    assembly="/bin/AutoFolders"
    type="AutoFolders.Providers.PropertyFolderProvider" >
    <property alias="UseUppercase">false</property>
    <property alias="PropertyName">area</property>
    <property alias="DefaultFolderName">Default</property>
    </folderProvider>
        -->
      </folderProviders>
      <autoFolders>
        <autoFolder docType="News"
                 folderProviderAlias="DateFolderProvider_Simple"
                 folderDocType="DatoFolder"
                 />
        <autoFolder docType="Standard_FullExample"
                 folderProviderAlias="DateFolderProvider_Full"
                 rootFolders="//* [@isDoc and @level=2]"
                 folderDocType="DateFolder"
                 truncatedFolderUrl="folder-1/folder-2/newsitems"
                 />
        <!-- EXAMPLE PROPERTY FOLDER IMPLEMENTATION
    <autoFolder docType="Property"
    folderProviderAlias="PropertyFolder"
    folderDocType="PropertyAreaFolder"
    rootFolders="//* [@isDoc and name() = 'PropertyArea']" />
        -->
      </autoFolders>
    </settings>

    Keep in mind that "DateFolder" is a document type, which has the alias of "DateFolder".

    Hope this helps.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft