Forum

Thread tagged as: Configuration, Gallery, PayPal

display previous url

Hello

Would like to display the full previous url on my shop/category.php. The previous url will be from the gallery/image.php and needs to be the full string. What's the best way to go about this?

Thank you.

Denise Courtney

Denise Courtney 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you mean like a back link from the browser history? I'm not quite clear on what the previous URL might be.

No not really as I wanted to display the URL as a visual reference with the individual gallery imageID. So this link from the gallery will appear on my shop pages.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, so do you mean previous or current?

Previous if that's possible?

Drew McLellan

Drew McLellan 2638 points
Perch Support

So how are you defining previous?

Was trying to use the navigation and <?php perch_pages_previous_page(); ?> and he default item.html but sow whole string but get no output at all.

Can I get values between different apps, like gallery and shop?

Drew McLellan

Drew McLellan 2638 points
Perch Support

I'm struggling to help you because your description of what you're trying to do is so unclear.

Are you trying to inspect the browser's history stack? Or get an adjacent page from the navigation? Or do something else?

I am sorry for not making things clear.

I have this page for example https://nickoakleyphotography.com/gallery/image.php?id=62.

Customer then goes to here https://nickoakleyphotography.com/shop/category.php?cat=acrylic-panels and on this page I want to show the image id from the previous page and thought I could do it by displaying the url string.

Please note: I have perch show all activated at the moment to see what fields are available.

Thank you for your patience.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Perch doesn't know which page your site visitor was on previously.