Add popular bookmarks to a web page 

Embed the most popular bookmarks into your web pages. Your web application can use this resource to enable users to see and navigate to the most popular bookmarks embedded on your web page.

This lists the bookmarks that multiple users have bookmarked recently. It captures the bookmarks that are displayed in the Most Bookmarked in the last 30 days section of the Popular tab of the Bookmarks application.

Note: The administrator can change the number of days from 30 to something different.

To find out how to add all bookmarks to a page, retrieve the resources described in Add bookmarks to a web page and Add a list of bookmarks to a web page.

Note: Search can only find bookmarks that the indexer has processed. The indexing interval is stored in a configuration property that your administrator can configure. See Manage search and index operations in the Administer Bookmarks section of the IBM Connections product documentation for more details.


Resource information

/lisnippet/popular

/snippet/popular

Use one or more of the input parameters to narrow the search. Separate multiple parameters with an ampersand (&).

Table 1. Input parameters

Parameter Description
lang Language code. Language of the strings in the output. If not specified, the first matching browser language is used, if available. The server then redirects the request to add this parameter to the URL. Specify this parameter to avoid a redirect.
page Page number. Specifies the page to be returned. The default is 1.
ps Page size. Specifies the number of entries to return per page.
type Filters the bookmarks returned in the feed. You can filter by the following values:
popular

    Returns a list of the most bookmarked web sites. This value is the default value.

visited

    Returns a list of the bookmarks that are accessed most often.


Example

You can add code similar to the HTML used in this example to display the popular bookmarks returned by either the /snippet/popular or /lisnippet/popular resource in a web page.

<script language="javascript" type="text/javascript" 
  src="http://yourcompany.com/dogear/lisnippet/popular?lang=en">
</script>

You can change the style of bookmarks returned by the /snippet/popular resource by applying a style defined in the cascading style sheet to them.

<div class="dogearlinks">
  <div class="dogearlink">
    <a href="http://sampleurl.com/" title="Description of URL">"Title of URL"</a>
    <br />
    <span class="dogearperson">Firstname&nbsp;Lastname</span>
    <span class="dogeartags">
        <a href="http://url.of.tag1">tag1</a>
        <a href="http://url.of.tag2">tag2</a>
        <a href="http://url.of.tag3">tag3</a>
    </span>
  </div>
</div>

You can change the style of list of bookmarks returned by the /lisnippet/popular resource by applying a style defined in the cascading style sheet to it.

<div class="dogearlinks">
  <ul class="doglinks">  
    <li class="doglink">
      <a href="http://sampleurl.com/" title="Description of URL">"Title of URL"</a>
    </li>
    <li>
      <ul class="dogdata">
        <li class="dogearauthor">
          <a href="http://url.of.person" title="url of person">"Person"</a></li>
        </li>
        <li class="dogeartags">
          <a href="http://url.of.tag1">tag1</a>
          <a href="http://url.of.tag2">tag2</a>
        </li>
      </ul>
    </li>
  </ul>
</div>



Parent topic

Extending bookmarks

Related reference
Add a set of bookmarks to a web page
Add a list of bookmarks to a web page


   

 

});