Inserting an arbitrary string in pathname
Permalink
Is there a way to create two URLs for one page in C5?
Is there a way to insert an arbitrary string as a part of the *pathname* without affecting the intended function?
Here's why:
I made a javascript to behave differently depending on the pathname from which it is called. In particular, I have something like this....
<code>
if (/full/i.test(location.pathname)) {
this.enterFullscreen();
}
</code>
This is a part of controlling a image gallery. I want to have two pathnames for some C5 pages. The alias function of C5 actually redirects so the javascript never see the original pathname specified by the user/browser. Inserting something like #fullscreen does not help as it's not seen by location.pathname.
When I made a static html page, a symbolic link on the server did the trick... like ln -s index.html fullscreen.html. (Check outhttp://silvergrain.com andhttp://silvergrain.com/fullscreen.html... ) I want to do the same thing onhttp://beaupix.comhttp://beaupix.com/headshot andhttp://beaupix.com/wedding and so forth. beaupix.com is as you see C5 based site whereas silvergrain.com is static html.
Is there a way to insert an arbitrary string as a part of the *pathname* without affecting the intended function?
Here's why:
I made a javascript to behave differently depending on the pathname from which it is called. In particular, I have something like this....
<code>
if (/full/i.test(location.pathname)) {
this.enterFullscreen();
}
</code>
This is a part of controlling a image gallery. I want to have two pathnames for some C5 pages. The alias function of C5 actually redirects so the javascript never see the original pathname specified by the user/browser. Inserting something like #fullscreen does not help as it's not seen by location.pathname.
When I made a static html page, a symbolic link on the server did the trick... like ln -s index.html fullscreen.html. (Check outhttp://silvergrain.com andhttp://silvergrain.com/fullscreen.html... ) I want to do the same thing onhttp://beaupix.comhttp://beaupix.com/headshot andhttp://beaupix.com/wedding and so forth. beaupix.com is as you see C5 based site whereas silvergrain.com is static html.