Page 1 of 1

Gallery Module: Odd linking back to parent page.

Posted: Sat Jan 08, 2011 8:04 pm
by pixelita
Hi, I'm working with the Gallery module for a fire department client's web site and I have created two subgalleries, Apparatus and Rescues.

Each of this is a subpage of the gallery page. I also created two separate templates, an "album" template (sheldon-album) that should just display the album "cover" image and link to the subgallery for each of those albums.

I also created an expanded template (sheldon-litebox) for each album. So far so good.

The main Gallery page is here:
http://sheldon.mytestbed.com/gallery/

And when you click on each you are taken to the respective album. Again, so far so good.

However, in either album, if you hover over the link "Back to Parent Gallery," OR even if you hover over the main Gallery page's two album cover links, you'll see the module appends "/60" to the URL, like this:
http://sheldon.mytestbed.com/gallery/60

That link SHOULD go to the main Gallery page (using the sheldon-album template). Yet it pulls the subdir template, sheldon-litebox.

What am I doing wrong? Should I check my .htaccess file? (That bit me in the behind earlier this week regarding another module on another CMSMS site. :)

Re: Gallery Module: Odd linking back to parent page.

Posted: Tue Feb 01, 2011 9:39 pm
by onninen
Hi,
I can confirm that I have exactly the same issue with my sub gallery links. However Gallery module adds different number to the end of sub gallery url in my site.
In my case it's 64: http://www.ikivihrea.com/kuvagalleria/Asetelmat/64/
This seems to have something to do with fact that when pretty urls are turned off, link is http://www.ikivihrea.com/index.php?mact ... 64&page=64

So I guess 64 is leftover from the original url and maybe your 60 comes from the same origin.
This might be the bug so I submitted the new bug to the gallery development page: http://dev.cmsmadesimple.org/bug/view/6058

Re: Gallery Module: Odd linking back to parent page.

Posted: Tue Feb 01, 2011 10:38 pm
by pixelita
Thank you!!!

Re: Gallery Module: Odd linking back to parent page.

Posted: Wed Feb 02, 2011 9:19 am
by nicmare
i think its no bug. its just the content_id of the page where the gallery modul is situated. and this is neccessary if you have a "deep" gallery tree.
you guys could write a "hardcoded" link in the template: {cms_selflink page=60 text="back"}

Re: Gallery Module: Odd linking back to parent page.

Posted: Wed Feb 02, 2011 12:58 pm
by Jos
This is indeed not a bug, This is the way cmsms creates the pretty url. Gallery uses a core function for that.

Re: Gallery Module: Odd linking back to parent page.

Posted: Wed Feb 02, 2011 2:08 pm
by onninen
As I wish to keep urls nice and tidy, it would be nice to have this extra number at the end hided when I'm linking directly to the specific sub gallery or browsing it.

I don't think that I'm able to use {cms_selflink page=60 text="back"} when I'm using sub gallery link on the picture like this:
<a href="kuvagalleria/Asetelmat/64/"><img src="uploads/images/12032010551_mini.jpg" alt="" width="135" height="101" /></a>

Is there any workaround for this or doing something differently?
Cheers and thanks for the response!