In this demo, the user can bookmark the current page and delete it from their saved bookmarks. This is achieved by setting the HeaderTextType option to "BookmarksLink" and setting the BookmarksURL option. This will insert a hyperlink enabling the user to go the page containing their saved bookmarks (see the Display Bookmarks demo). The ShowSort and ShowBookmarks options are set to false because they are not needed.

One alternative approach is to display only the add bookmark image by setting the ShowHeaderText option to false and moving the link to the bookmarks page to another location such as a menu item.


//"MyBookmarks1" is the id of the div element that will contain the app's content.
var ID = "MyBookmarks1";
//The path to the directory containing the Bookmark API files
var APIPath = " /Bookmark/";
//The path to theme related directory that contains the image files
var imagePath = "/mybookmarks/content/themes/Dodger_Blue/Images/18px/";
var options = {
HeaderTextType: "BookmarksLink",
BookmarksURL: "/demos/displaybookmarks",
ShowSort: false,
ShowBookmarks: false,
HeaderTextPosition: "right",
AddBookmarkStatusText: "Saving bookmark",
AddBookmarkSuccessText: "Bookmark Saved",
AddBookmarkTitle: "Bookmark this page",
HeaderText: "Bookmarks",
ExcludeTitleText: [{type: "Ends with", text: " - My Bookmarks"}],
//Bookmark API URLs
BookmarksListURL: APIPath + "BookmarksListURL",
CreateBookmarkURL: APIPath + "CreateBookmark",
DeleteBookmarkURL: APIPath + "DeleteBookmark",
UpdateVisitsURL: APIPath + "UpdateVisits",
AddBookmarkImage: imagePath + "addbookmark.png ",
ToggleDeleteImage: imagePath + "toggledelete.png"
var mybookmarks = new MyBookmarks(ID, options);