Hi i wanted to add a web part on the homepage of the site which should add up the links of the pages which are added to the site automatically once the page has been created is this possible with jquery or javascript since we don't go for server side solutions in our environment. will this be possible with content query or editor web-parts. I am using SharePoint 2010.Thanks in advance.
1 Answer
You can do this using a Content Query Web Part. Add the Content Query Web Part to the page where you want to display a list of the links to other pages. Then open the web part properties and expand the Query
section. For the Source:
section, select the Show items from all sites in this site collection
option. Then in the List Type:
section, select Pages Library.
Here's a screenshot of the property configuration:
At the bottom of the web part settings pane click Apply
then Ok
.
-
i tried this already but my scenario is I have to get only particular template based pages not all of them this option in CQWP gives all the links in the pages library I am looking to bring only work-space template based pages not all.Thank you. Aug 14, 2015 at 15:55
-
1Do you mean the work-space site template? Or do you have a custom created work-space page template? If you have a custom created page content type, then you can choose that under the
Content Type:
option in theQuery
section of the CQWP.– clkAug 14, 2015 at 16:48 -
-
1Ok, with that additional information then it doesn't look like there's an OOTB way to do what you want. You can use a web service to get all the site templates and filter by the specific template you want, but I'm not completely sure how to do that. It looks like you could also use the Table of Contents Web Part and then develop a custom XSL stylesheet to get just those sites. Check out this article for more info sharepoint.stackexchange.com/questions/3884/…– clkAug 14, 2015 at 17:24
-
I have gone through that site and got all the sub-sites but I am not sure on how to get the particular template based sites. Thanks for your brief responses. Aug 14, 2015 at 17:41