       docsCollection = @getCollection(collection)
       return docsCollection.models[docsCollection.length-1]
 
-    getDocCollection:(database, index, dir, categoryName, categoryTitle) ->
+    getDocCollection:(database, dir, categoryName, categoryTitle) ->
       query =
         write: true
         relativeOutDirPath: $endsWith: dir

        relativeOutDirPath: $startsWith: 'documentation'
        body: $ne: ""
        rootDoc: true
      sorting = [index:1]

      database.findAllLive(query, sorting).on 'add', (document) ->
        a = document.attributes

      database.findAllLive({tags:$has:'homepage_demo'}, [date:-1])

    getting_started: (database) ->
      docpadConfig.templateData.getDocCollection(database, '00_getting_started', 'getting_started', 'Getting Started')

    tutorial: (database) ->
      docpadConfig.templateData.getDocCollection(database, '01_tutorial', 'tutorial', 'Tutorial')

    handbook: (database) ->
      docpadConfig.templateData.getDocCollection(database, '02_handbook', 'handbook', 'Handbook')

    resources: (database) ->
      docpadConfig.templateData.getDocCollection(database, '03_resources', 'resources', 'Resources')

    community: (database) ->
      docpadConfig.templateData.getDocCollection(database, '04_community', 'community', 'Community')

    rootDocuments: (database) ->
      query =
