#1 May 20, 2016 9:50am

jmason03
Member
Registered: January 9, 2014
Posts: 123

Custom Preview Links with Different Behavior

I have a module with a custom preview page I created. The preview page sits in /custom/admin/modules/module_name/_preview.php. When in the module and using the preview icon, everything works great. However, when using the "Save & Preview" button or the preview link from the "Pending Changes" page, I am given a 404 error. Technically, all of them are going to the same link but I have noticed that the one in the module (the one that is working) is a relative link, but the others are absolute. Is this a bug or is this resulting from me incorrectly placing my preview file?

Thanks

Offline

#2 May 20, 2016 11:13am

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 974

Re: Custom Preview Links with Different Behavior

Is the Preview URL you've entered for your View a full URL or is it relative? If it's just a relative url (i.e. "_preview/") then it'll only work on the View (most likely because your view is the default landing for the module so it will already be at /admin/module_name/).

Offline

#3 May 23, 2016 2:32pm

jmason03
Member
Registered: January 9, 2014
Posts: 123

Re: Custom Preview Links with Different Behavior

Ah ok, that makes sense. Yes I had them as relative, I think because I thought it would be easier for them to work in the context of different domains but it should still be fine either way.

Thanks!

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.