Valery Posted March 31, 2014 Share Posted March 31, 2014 (edited) Hi everybody, I am setting up a web shop where customer would be able to select any of the offered products. My "orders" template has a single-page page field "product" linked to the products (for the reason of simplicity, it's 1 product per order). My product pages tree looks like this: [ Products ] ---- [ T-shirts ] --------- Yellow shirt --------- Blue shirt The "product" page field is set up like this: Parent of selectable page(s) = /products Custom selector = has_parent=/products, template=products The problem is that I can see the pages which match the custom selector just fine while editing my "orders" page. However, it seems that I can only save those pages which have "products" as their parent. Example: I can see "Yellow shirt" in the drop-down menu but I cannot save it unless I set "Parent of selectable page(s)" to "Products > T-shirts" How would you advise me to go about it? I want to setup a page field which would allow me to select and save any page with a certain template, regardless of what parent this page has. UPDATE: PageListSelect for a page field is indeed a workaround of sorts but I am still puzzled: why does not a custom selector override Parent of selectable pages? And how on earth does one set up a Page field that would allow any page with a given template to be selected (wherever that page might be!) ? Edited March 31, 2014 by Valery Link to comment Share on other sites More sharing options...
bwakad Posted March 31, 2014 Share Posted March 31, 2014 in my case I had the same problem until I used parent=page.province and I was able to save... but I am just guesing, really don't know so much yet Link to comment Share on other sites More sharing options...
Valery Posted March 31, 2014 Author Share Posted March 31, 2014 Bwakad, thanks man. But I start to think that this is somehow OK for Page fields to behave this way. I found a workaround by setting Input Field Type to PageListSelect because of this: + Types indicated with a plus assume a "parent" to be the root of a tree, rather than an immediate parent. (it's sort of okay for my case just because I have this field locked, and it means it's not giving me the long-loading ajax page tree every time) What really bugs me is why a Custom Selector of a Page field is giving me pages which I can select but cannot save? Link to comment Share on other sites More sharing options...
Soma Posted March 31, 2014 Share Posted March 31, 2014 Just don't specify a parent. It's not mandatory if you have template or selector. 1 Link to comment Share on other sites More sharing options...
Valery Posted April 1, 2014 Author Share Posted April 1, 2014 Soma, that's exactly what my problem is: I can't! I attach a screenshot of my setup just to make it easier to understand. When I try to save my page selection (the page has a different parent) I get the "Page <id> is not valid for <field>" error. Link to comment Share on other sites More sharing options...
arjen Posted April 1, 2014 Share Posted April 1, 2014 I think you have to "unselect" the Parent of selectable page(s). 1 Link to comment Share on other sites More sharing options...
Valery Posted April 1, 2014 Author Share Posted April 1, 2014 Thanks, Arjen! Sometimes obvious things get the last to be thought of. Also, thanks Soma. You guys helped me a lot with this nuissance. 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