0

I'm kind of a SharePoint noobie still, but have been tasked with creating a "web crawler" to search through a certain site url within SharePoint. So, given the url, I want to output the pages nested within in some format (preferably bullet list)

Like so:

  • Page 1
    • Page 2
    • Page 3
  • Page 4
    • Page 5
      • Page 6
      • Page 7
    • Page 7
  • Page 7

I'm not asking to help me write the program, but am asking for which technologies are preferred in this case to be used. I'm definitely sticking with JavaScript since it needs to be lightweight and I don't plan on learning something completely new to output html to a webpart.

Any pointers?

Edit: I'm learning to use SPServices so this will be one of the libraries I'll be using along with jQuery.

0

For starters - I would not create a "crawler". SharePoint already has an enterprise search tool built right in. If you have Enterprise SKU use the Content Search Web Part to define your query. If you have Standard - use the Search Results Web Part.

Once the data is correct - look to format it with Display Templates. To get what you are after you will most likely need to create both a control and item template.

2
  • Jesus, thanks for the answer. The reason why I want to code it is because this is something that we want to use in multiple sites. For example, www.site.com/subsite1/ and www.site.com/subsite2/ will be two different templates so I want this to be reusable. With what you're explaining, is this also the case?
    – Andy
    Nov 17 '15 at 13:29
  • Absolutely - you change the query on your second site and assign the same templates. The query is the key to content - templates are just how content is displayed. Do search on "content search web parts" and "search display templates" Nov 17 '15 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.