CMS MADE SIMPLE FORGE

Album

 

[#1437] Javascript doesn't load when pretty urls with hierarchy enabled - big picture doesn't show

avatar
Created By: Jan Vinárek (vin)
Date Submitted: Fri Apr 06 06:22:36 -0400 2007

Assigned To: Elijah Lofgren (elijahlofgren)
Version: None
CMSMS Version: None
Severity: Trivial
Resolution: Fixed
State: Closed
Summary:
Javascript doesn't load when pretty urls with hierarchy enabled - big picture doesn't show
Detailed Description:
I had the problem with displaying 'big picture' with multiple albums on one
page. The template and CSS was fine, just the javascript for the slideshow
didn't function. Then I realised something must be wrong with the <script> tags
in the template. It was. The slash at the beginning of the url was missing,
hence the wrong url, because for a section deep in hierarchy the url is relative
to the "parent" section.

Solution: Just add slash before the url in the src. This will make it point to
the script correctly.


History

Comments
avatar
Date: 2007-04-06 11:11
Posted By: Elijah Lofgren (elijahlofgren)

Hi Jan,

Thanks for letting me know about this issue.

One problem with adding the slash is that if people have installed CMSMS into a
subdirectory, the links won't work.

Everything should work if you put this tag in between your <head> </head> tags
in your page template like this:
<head>
...
{metadata}
</head>

That will make CMSMS output a tag like this:
<base href="http://www.elijahlofgren.com/" />

which should make all relative links work fine, even if hierarchy is enabled.


The other option would be for me to change the template to include a full URL to
the JS so that it should always work, even if the metadata tag is not used. I'm
busy with school right now, so that will have to wait.

Hope this helps,

Elijah
      
avatar
Date: 2007-04-14 14:06
Posted By: Jan Vinárek (vin)

Uh-huh. I didn't thought of that. Must have erased it in metadata.
      
avatar
Date: 2007-04-14 14:11
Posted By: Jan Vinárek (vin)

And thanks!!
      
avatar
Date: 2007-05-10 11:27
Posted By: Elijah Lofgren (elijahlofgren)

I've added a note about needing the metadata tag in the troubleshooting section
of Album help.