Enabling quick access to a given asset from its front-end site page
You can add a bookmarklet to your browser that will take you from a page’s front end to its corresponding content edit page in Brightspot when clicked. For example, if you have an article named Creating a GraphQL query in Brightspot
that you are viewing on your site, you can click the inline edit bookmarklet to open the content edit form for the Creating a GraphQL query in Brightspot
asset.
For the bookmarklet to work correctly, your Brightspot instance must include a specific meta tag in the HTML header. This tag, <meta name="brightspot.contentId" content="YOUR_CONTENT_ID">
, provides the unique content identifier that the bookmarklet uses to construct the URL for accessing the Brightspot content editing page.
Adding the inline edit bookmarklet
Browser-specific directions on how to add the inline edit bookmarklet
- Chrome
- Firefox
This topic was written for Chrome Version 134.0.6998.166 (Official Build) (x86_64)
. Depending on your version of Chrome, the steps to access your bookmark manager and add a bookmark may vary. See Create, find and edit bookmarks in Chrome for the latest details.
-
Access your bookmark manager by clicking in the top right of your browser window, expanding Bookmarks and Lists, and clicking Bookmark Manager.
-
Add a new bookmark by clicking in the top right of the page, and then clicking Add new bookmark.
-
In the Name field, enter a name for the bookmark (for example,
View in Brightspot
). -
In the URL field, add the bookmarklet code below.
javascript: void function(){var bspUrl='https://'+window.location.hostname+'/cms/content/edit.jsp'; var metaName='brightspot.contentId'; var metas=document.getElementsByTagName('meta'); var found=false; console.log(bspUrl); for(var i=0; i<metas.length; i++){ console.log(metas[i]);if(metas[i].getAttribute('name')===metaName){ found=true; open(bspUrl+'?id='+metas[i].getAttribute('content'), '_blank');}} if(!found){alert("Error Finding In Brightspot");}}();
Your screen should look similar to the following image:
-
Click Save.
This topic was written for Firefox Version 136.0.3 (64-bit)
. Depending on your version of Firefox, the steps to access your bookmark manager and add a bookmark may vary. See Bookmarks in Firefox for the latest details.
-
Access your bookmark manager by clicking in the top right of your browser window, expanding Bookmarks, and clicking Manage bookmarks.
-
From the drop-down, click Add Bookmark.
-
In the Name field, enter a name for the bookmark (for example,
View in Brightspot
). -
In the URL field, add the bookmarklet code below.
javascript: void function(){var bspUrl='https://'+window.location.hostname+'/cms/content/edit.jsp'; var metaName='brightspot.contentId'; var metas=document.getElementsByTagName('meta'); var found=false; console.log(bspUrl); for(var i=0; i<metas.length; i++){ console.log(metas[i]);if(metas[i].getAttribute('name')===metaName){ found=true; open(bspUrl+'?id='+metas[i].getAttribute('content'), '_blank');}} if(!found){alert("Error Finding In Brightspot");}}();
Your screen should look similar to the following image:
-
Click Save.