Question

Was trying to edit an existing home .aspx page on SharePoint online.

It contains an announcement section populated with the latest announcements. When I downloaded and edited the .aspx page. I see the announcements div but I don't see any content within it.

<div id="divAnnouncements" style="">
    <h4>
        <strong>ANNOUNCEMENTS</strong>
    </h4>
    // content is supposed to be here but there's nothing
</div>

My question is how does SharePoint populate this div with content from the announcement list?

Is it through a custom script that locate it based on div id?

Or some script located in the master page?

Or some directive?

Was it helpful?

Solution

Looking at html provided by you, it seems you have a customized home page. I would recommended you to check below

  1. Add ?contents=1 at end of page to see what all webparts are added on page. https://avengers.sharepoint.com/sites/spiderman/SitePages/Home.aspx?contents=1

  2. Check if you have page has any script editor webpart on this page(for classic experience)

  3. Another thing you can check is use google chrome developer tool and network tab to see if any custom web service is being called.

  4. Check your data being displayed in Announcements, find corresponding list or "divAnnouncements" and find references to list in you all JS file being called on pages.

  5. Check page source using (view source from browser) and search for
    text hinted about list name or "divAnnouncements"

As this is definitely some customization, until you analyse all js files or home page in details you won't know.

Hope this helps as directive.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top