CMS MADE SIMPLE FORGE

Gallery

 

[#4063] Back link uses returnid instead of pretty URL

avatar
Created By: kwurzel (kwurzel)
Date Submitted: Sat Sep 19 07:31:29 -0400 2009

Assigned To: Jos (josvd)
Version: 1.0.3
CMSMS Version: None
Severity: Minor
Resolution: Fixed
State: Closed
Summary:
Back link uses returnid instead of pretty URL
Detailed Description:
When using a sub gallery, the back link links to the ID of the parrent page
(returnid). Instead, it should link to the pretty URL.

How to reproduce:

(0. enable pretty URLs)
1. Create a gallery with a few photos
2. Add a sub gallery with another few photos
3. Visit the main gallery page
4. Have a look at the sub gallery link. It points to /gallery/[sub gallery
name]/[returnid]. Click on it.
5. Have a look at the back link. It points to /gallery//[returnid] (sic!).
Instead, it should point to /gallery/[main gallery name]


History

Comments
avatar
Date: 2009-09-19 08:17
Posted By: Jos (josvd)

Please explain or provide a link why exactly /gallery//[returnid] is a problem?

As far as I can see it the returnid is needed while creating a frontend link
with the cmsms module api.
      
avatar
Date: 2009-09-19 10:25
Posted By: kwurzel (kwurzel)

It creates duplicated content, since your coming from /gallery/[main gallery
name], but return to /gallery//[returnid]. However, i just realized that
"//[returnid]" may be "/gallery/[main gallery name]/[returnid]" with an empty
"name" string.

It would be more logical if you were going back to where you came from. :-)
      
avatar
Date: 2009-09-19 10:46
Posted By: Jos (josvd)

quote: "i just realized that
"//[returnid]" may be "/gallery/[main gallery name]/[returnid]" with an empty
"name" string"

That is exactly the case. The link is constructed the same way for every
sub-sub-sub-gallery, So to solve your problem, I have to build in some logic
that tests if the parent is the root, which does not have to be the gallery-dir,
f.e. in case you use the dir parameter.

What I don't want is to put the original "root" dir in the linkpath, so I cannot
retrieve it as a parameter. Cookies are bad for this purpose either.

So I guess you have a good point, at least indirectly, but I don't know how to
solve it...
      
avatar
Date: 2009-11-08 17:42
Posted By: Jos (josvd)

fixed the double // in case of an empty dir string
      
Updates

Updated: 2010-07-06 16:54
state: Open => Closed

Updated: 2009-11-08 17:42
resolution_id: 5 => 7

Updated: 2009-09-19 10:58
resolution_id: 10 => 5
severity_id: 4 => 3

Updated: 2009-09-19 08:17
resolution_id: => 10
severity_id: 2 => 4
assigned_to_id: 100 => 11752