by

Pub Up: A bookmarklet for Tridion

A few months ago, Dominic Cronin got this wild idea to have a bookmarklet competition with Tridion. The rules were very simple: Make a bookmarklet that does something with the GUI in Tridion. Share it.

Well, I’m a fan of JavaScript. And challenges. So I whipped up Pub Up!

The Problem

Have you ever been looking at a folder in Tridion, and wanted to be in that same folder, but in a higher publication? Lord knows I have. It’s annoying that you have to go to another publication, and click open each of those folders one by one, again.

The solution

It’d be mighty handy to have a button that you could click that keeps you where you are, but takes you one publication higher. It’s just about saving clicks (which can be many if you’re 10 folders deep).

How Pub Up works

Pub Up grabs the current location from SDL.Client.UI.ApplicationHost.ViewModels
.Navigation.currentNavigationItem()
. It parses the src property of targetDisplay to find the publication, decrements it, and then takes you there.

Right now Pub Up does it the dirty way, by posting the uri to window.location, but I’m going to see if I can clean it up and use the Tridion GUI to take you there.

If you want to try it out, just drag this into your bookmarks bar:

Pub Up!
 

About the bookmarklet

If you inspect the code on my bookmarklet, you’re not going to find any Pub Up code. I’m hosting the JavaScript on a subdomain of mine. The bookmarklet just grabs my JavaScript file from my domain, and executes it. So it’s a bookmarklet that doesn’t need updating (well, from you, anyway).

The code

If you want to take a look at the code, I put a version of it up on Github. Or, if you wanted to see the latest version you could take a look at http://apis.frankmtaylor.com/navHappy.js. Let me know what you think!