Console icon indicating copy to clipboard operation
Console copied to clipboard

Clickable links in console

Open kningyi opened this issue 3 years ago • 6 comments

Hi,

I was wondering that since Sitecore IDs are clickable in the console (leading to the Sitecore item in Content Editor), is there a way to make clickable urls?

e.g. I would like to be able to click on a url from the console to open in a new tab, or to download from that url.

Also, I notice the ID links only lead to the the item in the shell context language, even if there's no version for that language. Is there a way to open to a different language instead? Like say, open to the current language of the ISE window.

kningyi avatar Nov 18 '22 15:11 kningyi

Do you have a sample script or command you run that produces data with a url?

michaellwest avatar Nov 18 '22 15:11 michaellwest

Like these yellow clickable links:

Image

So it'll be great if I can do something like Display-Url -Path "/test.txt" -Download or similar to allow it to be clickable in console, as sometimes I would like to display a list of links in console, and click on them ad-hoc

kningyi avatar Nov 18 '22 16:11 kningyi

It's more common to write reports where the column values contain the hyperlinks. In the case of Urls, those are generally generated based on Sitecore context.

This appears to work OOTB.

[pscustomobject]@{"Url"="https://doc.sitecorepowershell.com/"}

michaellwest avatar Nov 18 '22 16:11 michaellwest

Hmm.. so is it just my system that's not working? :(

image

kningyi avatar Nov 21 '22 06:11 kningyi

I see, the console and ISE have different formatting behavior.

image

michaellwest avatar Nov 21 '22 20:11 michaellwest

Nice.

While we are at it, is it possible to use the current ISE language when clicking on the ID link?

image

e.g. item:load(id={B82B0E53-3EB6-4AA6-9E39-60BE22426E02},language=en-GB)

kningyi avatar Dec 01 '22 09:12 kningyi

This issue is stale because it has been open for 365 days with no activity.

github-actions[bot] avatar May 12 '24 02:05 github-actions[bot]

That's not stale. @michaellwest actually implemented this and it's released in 7.0.

AdamNaj avatar May 14 '24 21:05 AdamNaj