#1 January 29, 2016 4:41pm

jmason03
Member
Registered: January 9, 2014
Posts: 123

Keeping URL Variables with BigTree Redirect

I need to be able to pass url variables to the url of a page's external link so that they also exist on the new url and are present after the user is redirected. I figured out how to do it on the site that I have running 4.2.8 but for some reason the same process does not work on an older site I have on 4.1.5. I've been trying to modify the redirect function so that it appends any variables in the $_GET to the url that the user will be redirected to, but on the 4.1.5 site it's only working in the admin. Is the behavior of external redirects different on that version? Is it possible on that version to accomplish this?

Thanks

Offline

#2 January 30, 2016 11:00am

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

Re: Keeping URL Variables with BigTree Redirect

I don't think the redirect function behaves differently in 4.1 than 4.2 -- can you paste the code modifications you're trying?

Offline

#3 February 1, 2016 11:55am

jmason03
Member
Registered: January 9, 2014
Posts: 123

Re: Keeping URL Variables with BigTree Redirect

I ended up going about it a different way. What I was trying to implement/add on to the redirect function was not co-existing well with some of the other urls, particularly in the admin.

I do have one other unrelated question. I have written a custom view but I want it to be the default view for the module. So that when you click on the module from the main list, my custom view is what the user is taken to first. I added it as an action and moved it to the top of the list and then deleted the one created by default but when I choose the module it gives me "Page Not Found". Is it possible to make a custom view the default for a module?

Offline

#4 February 2, 2016 9:59am

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

Re: Keeping URL Variables with BigTree Redirect

By custom view do you mean a custom override in /custom/admin/modules/[module_route]/ ? If you want a default landing in there you should be able to drop in a default.php file and have it show.

i.e.

/custom/admin/modules/btx-dogwood-blog/default.php renders this for me:

YyONWWq.png

Offline

#5 February 2, 2016 11:18am

jmason03
Member
Registered: January 9, 2014
Posts: 123

Re: Keeping URL Variables with BigTree Redirect

Ah, it was so obvious. I don't know why I didn't do it that way. I was naming my file and putting that in the route rather than having a default.php and a blank route.

Thanks again for your help on this!

Offline

Board footer

Powered by FluxBB

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