A chrome extension for contentstack.built.io that allows the user to click on an element from a contentstack website and be taken to the latest revision of that element.
In order to get your contentstack to work with the google chrome extension, some attributes need to be added to your templates. The steps below go through how to add these attributes to your local contentstack repository. In order for the extension to work on your published site, the same steps need to be followed and pushed to the published site's repository.
-
You need to have a contentstack developer account and be able to create & manipulate stacks & environments.
-
Follow the steps on contentstacks developer wiki to download & install the developer repository. (see link below): https://contentstackdocs.built.io/developer/web/installation
-
Modify all index.html files inside the themes/basic/templates/pages
-
add the following attributes to the section tags inside the index.html files.
data-content-type-id="{{content_type}}" data-entry-id="{{entry.uid}}"
-
Save and launch the local repo and you should be all set.
Once the setup steps are completed, the only remaining step is to load the extension. Below is a sample workflow for using the extension.
NOTE: Contenstack.built.io & contentstack api calls work independently of each other. Currently there is no way for both to communicate with each other, so there is an additional step required to use this extension. Issue is documented as Issue #2
- Navigate to contentstack.built.io and login (this step needs to be done due to the note mentioned above). This will have to be done every time your contentstack session expires.
- Navigate to your contentstack published website
- Click on the chrome extension in the toolbar.
- Login to contentstack via the extension (click the login link and run through the form)
- Turn on the extension for this tab (toggle the switch to the "ON" position)
- You can now hover over any DOM element and should see a colored rectangle around the element
- Clicking on an element once will show a popup that will give the latest revision information for that element.
- An additional click on that element will launch a new tab that will take you to that specific revision.
NOTE: This extension is independent of each tab. You should be able to turn it off/on for each tab.