Welcome to Vortx Community Forum, where you can ask questions and receive answers from the staff at Vortx and other members of the community.

If you had a user account on our previous forums website, you will need to register a new account here.

Learn more about...


Renaming image popup windows and hiding URL

The product image popup that shows when you click on an image currently shows the URL and a title of something like "Popup Window 536107.

We would like to change the title and hide the URL Any asssistance is appreciated
asked Aug 10, 2015 in MultiStore by mgoldberg (150 points)

2 Answers

0 votes
Here's what I could determine based on your site's behavior and the code that I have in my v9.2.

The window title always contains "Popup Window" followed by a seemingly random number. From multiple attempts on the same image, I've gotten 5- and 6-digit numbers. I even tried clicking in the same spot repeatedly, and got the same effect.

The anchor element on your product image has an attribute onclick="popUpLarge()", but there is no such function declaration in your page source. This behavior is being driven from the server when the image is clicked.

I searched my site's code and got a result of mobile.vortxmultiimage.xml.config. I doubt this is the same location that is driving the behavior you're seeing, but it could be very similar code. Did another search on just the source code project and found the function declaration within the ASPDNSFCore\ProductImageGallery.cs file.

This codeblock appends a window.open() JavaScript command that expicitly sets the window title to (in 9.2) 'LargerImage' followed by a random number between 1 and 100000, which jibes really well with the observed behavior.

I really don't know why the random number would be desirable here, since the contents of the popup window can be reliably accessed from a single URL. Someone else is going to have to speak into the design intention on that one.

For now, I can point you toward ASPDNSFCore\ProductImageGallery.cs in the source code project as the root of this behavior.
answered Aug 10, 2015 by Chris (3,685 points)
+1 vote

To change the popup window name/page title

popup.aspx.cs, line 31

PageTitle = "Popup Window " + CommonLogic.GetRandomNumber(1, 1000000).ToString();

We change ours to

PageTitle = "eg. " + CommonLogic.GetRandomNumber(1, 1000000).ToString();

As we did not like "Popup Window" being a highly used keyword phrase on our site. the term "eg" is a stop word, not indexed by search engines.

answered Aug 11, 2015 by Vegarari (350 points)
Thanks for weighing in with the more recent code on this one. Do you have any idea why the decision to insert the random number?