cancel
Showing results for 
Search instead for 
Did you mean: 

Creating 'New Folder'

mizage
Champ in-the-making
Champ in-the-making
When creating a new folder, it automatically creates an index page and the collections folder. In what package does this occur.
3 REPLIES 3

bremmington
Champ on-the-rise
Champ on-the-rise
This is done by the behaviours defined in the SectionType class. You can change the asset collections that are created by overriding the bean named "wqsmodule_sectionAssetCollections". The default definition of this bean is contained in a file named "model-context.xml", and looks like this:

   <bean id="wqsmodule_sectionAssetCollections" class="java.util.ArrayList" >
      <constructor-arg>
         <list>
            <bean class="org.alfresco.module.org_alfresco_module_wcmquickstart.model.AssetCollectionDefinition">
                <property name="name" value="latest.articles" />
                <property name="title" value="Latest Articles" />
                <property name="queryType" value="alfrescoCmis" />
                <property name="maxResults" value="3" />
                <property name="query"><value>SELECT d.* FROM cmis:document AS d JOIN ws:webasset AS wa ON d.cmis:objectId = wa.cmis:objectId WHERE d.cmis:objectTypeId='D:ws:article' AND in_tree(d, '%{section:.}') ORDER BY wa.ws:publishedTime DESC</value></property>
            </bean>
            <bean class="org.alfresco.module.org_alfresco_module_wcmquickstart.model.AssetCollectionDefinition">
                <property name="name" value="section.articles" />
                <property name="title" value="Articles" />
                <property name="query"><value>SELECT d.* FROM cmis:document AS d JOIN ws:webasset AS wa ON d.cmis:objectId = wa.cmis:objectId WHERE d.cmis:objectTypeId='D:ws:article' AND in_tree(d, '%{section:.}') ORDER BY wa.ws:publishedTime DESC</value></property>
            </bean>
            <bean class="org.alfresco.module.org_alfresco_module_wcmquickstart.model.AssetCollectionDefinition">
                <property name="name" value="featured.articles" />
                <property name="title" value="Featured Articles" />
            </bean>
         </list>
      </constructor-arg>
   </bean>
Hopefully it should be fairly clear how you might change this to alter the auto-created asset collections.

What are you looking to do?

mizage
Champ in-the-making
Champ in-the-making
Thanks for the quick reply. As for what I'm trying to do, I guess I'm trying to figure out the inner workings, because we will have to change some of the default behavior.  We are moving from one CMS implementation and have offer some of the same functionality of the current system.  It's going to be a bit of challenge, to say the least.

bremmington
Champ on-the-rise
Champ on-the-rise
Thanks. I'd be interested to know a little more about the gap between your current solution and WQS. Always on the lookout for ways to prioritise work  Smiley Happy

If you're willing to, please either drop me a private message through the forums here, or drop me an email. My address is brian.remmington at the alfresco domain.