Replace your target link with what you want
URL Replacement Extension
The main idea is from Sitecore CMS.
When I was working on Content Editor in creating new page items or updating published pages, I sometimes need to compare the item to current live page to see how current live page looks like. In this case, I would open a new tab or window and manually type “http(s)://www.mysite2.com/Finance/Market_News” in Address Bar because its database-driven item path is “/sitecore/content/Site2/Finance/Market_News” in Sitecore.
I was looking for a better way to reduce a few seconds and thinking that “Okay, let’s create a command which is getting item’s path by Item ID and replace prefix (“/sitecore/content/Site2/”) with site domain (http://www.mysite2.com/). This command would be used in a new ribbon in Content editor and xEditor (Page Editor).” In addition to this, there is a way to change the target DB to “Web” DB instead of “Master” when user clicks “Preview”.
However, until Sitecore Administrator or/and .Net developers add this feature, Sitecore end-users who have access to Content Editor would not have any chance to open live page directly from Content Editor. This, my own concern, made me think of creating a Chrome Extension so that any user can use shortcut without asking new feature to their agents or vendors. Even the main idea was from Sitecore, this extension can be used in any web page.
======= Version 1.1 =======
- Enable Incognito mode
- Minimize the size of package
Read more
When I was working on Content Editor in creating new page items or updating published pages, I sometimes need to compare the item to current live page to see how current live page looks like. In this case, I would open a new tab or window and manually type “http(s)://www.mysite2.com/Finance/Market_News” in Address Bar because its database-driven item path is “/sitecore/content/Site2/Finance/Market_News” in Sitecore.
I was looking for a better way to reduce a few seconds and thinking that “Okay, let’s create a command which is getting item’s path by Item ID and replace prefix (“/sitecore/content/Site2/”) with site domain (http://www.mysite2.com/). This command would be used in a new ribbon in Content editor and xEditor (Page Editor).” In addition to this, there is a way to change the target DB to “Web” DB instead of “Master” when user clicks “Preview”.
However, until Sitecore Administrator or/and .Net developers add this feature, Sitecore end-users who have access to Content Editor would not have any chance to open live page directly from Content Editor. This, my own concern, made me think of creating a Chrome Extension so that any user can use shortcut without asking new feature to their agents or vendors. Even the main idea was from Sitecore, this extension can be used in any web page.
======= Version 1.1 =======
- Enable Incognito mode
- Minimize the size of package
Source Manifest.json
{"update_url": "https://clients2.google.com/service/update2/crx",\t"manifest_version": 2,\t"name": "URL Replacement",\t"version": "1.1",\t"options_page": "configuration.html", \t"description": "Replace your target link with what you want", \t"short_name": "URL Replacement",\t"incognito": "split",\t"content_scripts": [\t{\t\t"matches": [\t\t"" \t\t],\t\t"js": ["js/jquery-3.1.0.min.js"]\t}\t],\t"icons" : {\t "16" : "img/icon_arrow3.png",\t "128" : "img/icon_arrow3.png"\t},\t"browser_action": {\t\t"default_icon": "img/icon_arrow3.png",\t\t"16": "img/icon_arrow3.png", "default_title": "URL Replacement", "default_popup": "popup.html"\t},\t"permissions": [\t\t"contextMenus",\t\t"tabs",\t\t"storage", "activeTab"\t],\t"background": {\t\t"scripts": ["js/content.js"]\t} }
Read more