joe_g Posted May 30, 2013 Share Posted May 30, 2013 Hi, ran into a weird range slider error. I have a range slider "size" with a number 1-3. Sometimes I want to override the value in the cms by doing $my_page->size = 3, or similar. Works fine most of the cases, except in one particular page where I get Error: Exception: Page '/page/path/' is not currently viewable. (in /Applications/MAMP/htdocs/vandejong/wire/modules/PageRender.module line 218) ...if I try to echo $my_page->size. If I try to set it, it becomes "1" regardless of what value I try to set it to. anyone seen this? thanks! J Link to comment Share on other sites More sharing options...
Soma Posted May 30, 2013 Share Posted May 30, 2013 So there is something wrong with that page? Is it unpublished or some permissions set? Any more details would help. Link to comment Share on other sites More sharing options...
joe_g Posted May 30, 2013 Author Share Posted May 30, 2013 Ah, it's simpler than I thought. I don't seem to be able to set any value in php of a range slider field $my_page->my_rangeslider = whatever integer always becomes echo $my_page->my_rangeslider; // 1 Link to comment Share on other sites More sharing options...
Soma Posted May 30, 2013 Share Posted May 30, 2013 It is my range slider module right? Link to comment Share on other sites More sharing options...
joe_g Posted May 30, 2013 Author Share Posted May 30, 2013 yep =) Link to comment Share on other sites More sharing options...
joe_g Posted May 30, 2013 Author Share Posted May 30, 2013 no biggie, made an easy workaround by using another variable for setting and overriding the range slider value J Link to comment Share on other sites More sharing options...
Soma Posted May 30, 2013 Share Posted May 30, 2013 Can you tell a little more what the field settings are set to? Ok it's a litte special with this field because it also supports "range" setting (min,max). So it has two values actually and uses outputformatting because is an object behind the scenes. To set the value in template code you need to turn it off and use $page->of(false); $page->range->set("min", 3); $page->of(true); or $page->of(false); $page->range->min = 3; $page->of(true); 2 Link to comment Share on other sites More sharing options...
joe_g Posted May 31, 2013 Author Share Posted May 31, 2013 works perfect! thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now