Robin S Posted December 1, 2018 Posted December 1, 2018 On 11/23/2018 at 6:06 AM, adrian said: including now automatic selection of the page field value type and input field type based on the plurality of the field label Such a cool wee surprise, love it. 1
Robin S Posted October 25, 2019 Posted October 25, 2019 Hi @adrian, This will probably sound like an odd request given the name of the module... What do you think about adding an option to not actually create a Page Reference field but only create the templates and pages (if any)? The smart template naming and template restriction features are so useful that I often execute the module and then just delete the Page Reference field because I don't need it. I'm not sure if you or anyone else ever do this, but if I'm not the only one maybe it would be a handy addition to the module? 1
adrian Posted October 25, 2019 Author Posted October 25, 2019 1 minute ago, Robin S said: I'm not sure if you or anyone else ever do this, but if I'm not the only one I've definitely done that before as well, so you're not the only one ? You're right that it kinda makes the module name a bit weird, but then it's always been a bit of a mouthful anyway. The thing is I am not sure what would be the most logical way to support this - everything is pre-populated based on the field label and its plurality. I am thinking that there should be a "Create Field" checkbox in the field settings that is checked by default, but if you uncheck, the field settings are hidden and the form starts at the "Page Settings" fieldset where you need to manually enter the Parent Page Title and that is used to automatically populate the parent and child template field lables/names (rather than coming directly from the field label? Any thoughts? 1
Robin S Posted October 25, 2019 Posted October 25, 2019 3 minutes ago, adrian said: I am thinking that there should be a "Create Field" checkbox in the field settings that is checked by default, but if you uncheck, the field settings are hidden and the form starts at the "Page Settings" fieldset where you need to manually enter the Parent Page Title and that is used to automatically populate the parent and child template field lables/names (rather than coming directly from the field label? That sounds sensible. I guess Pluralize would need to be reinitialised with different settings depending on if a field is being created or not, so you could put that JS into a function with a parameter that switches the type of initialisation and then call that on window load and on checkbox change. Or there are probably other ways too.
adrian Posted October 25, 2019 Author Posted October 25, 2019 Yeah, I am sure I can sort out the Pluralize issues. Of course the really simple solution here would be keep the field settings even with the create field checkbox unchecked - this way nothing else would need to be changed - you'd just use the field label as the way to generate all the other things. It would work well, but would be a strange / confusing interface. 1
Robin S Posted October 25, 2019 Posted October 25, 2019 1 minute ago, adrian said: f course the really simple solution here would be keep the field settings even with the create field checkbox unchecked - this way nothing else would need to be changed I'd be totally fine with that. It could be a "Don't create field" checkbox and you could even use some custom CSS to put it somewhere subtle and out-of-the-way. That way it's not distracting/confusing for people who use the module in the standard way but is available for those who want it.
adrian Posted October 25, 2019 Author Posted October 25, 2019 @Robin S - the option is now available in the latest version. It feels a bit weird the way I have implemented it, but it's the quickest option for now. 1
Robin S Posted October 25, 2019 Posted October 25, 2019 3 hours ago, adrian said: the option is now available in the latest version Super-cool, thanks!
gornycreative Posted August 7, 2021 Posted August 7, 2021 I have what might seem like a strange request, but is it possible to pick the delimiter for the name generation for templates? I typically use a dash delimiter for template and the underscore for fields, so I end up having to rename templates every time I generate them with the module. I don't know if there is a best practice for these conventions - I just have always understood that underscores in URLs were to be avoid in favor of dashes and so I use dashes in my template names and underscores in my field names to keep them sraight. Just an option to be able to separately pick or enter alternative delimiters for the template and field name generation would be nice.
adrian Posted August 7, 2021 Author Posted August 7, 2021 24 minutes ago, gornycreative said: I just have always understood that underscores in URLs were to be avoid in favor of dashes and so I use dashes in my template names and underscores in my field names to keep them sraight Just to clarify, in case you don't know, having a template name with an underscore doesn't at all impact the URL of pages using that template? That said, I've gone ahead and added an option to choose from an underscore or dash for the template names. Please grab the latest version.
gornycreative Posted August 7, 2021 Posted August 7, 2021 Yes I see your point. Because the slug in pw comes from the page name, not the template name. I'm getting my systems confused over here - with another popular system. Ugh. Thanks for making the change anyway.
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