Jump to content

Settings Factory


Macrura

Recommended Posts

@gornycreative thanks - the use case sounds interesting and obviously useful for dynamically generating options from other places than static choices; I'll play around with it soon and try and post back, have some projects that will probably need more elaborate settings pages soon...

Link to comment
Share on other sites

If you want to try the example I built (it looks for css/less files in assets/fonts and templates/ and then parses font families and returns a select options box with unique path/font family pairs) let me know and I'll tidy up an example and attach it.

On the backend it gives me this:

image.thumb.png.9fa2bb0eb849834f4e2892d7f5fc34ac.png

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

  • 5 months later...
50 minutes ago, Krlos said:

Hi @Macrura,

I just found your amazing module, how can I enable multilanguage support for fields?

Thanks.

 

Hi Krlos - thanks - I believe the module does support multilanguage, and we had added support for that a few years ago. I know there is probably no example of how to set a multilanguage field in the samples, but AFAIK it should work if you get the JSON or PHP setup to tell it the various language parameters.

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
8 minutes ago, fruid said:

has something changed in this module? Because I cannot seem to find the place where you enter the path to the json or php file with the settings array. I'm on ProcessWire 3.0.207

@fruid First create a new admin page (under admin, with admin template) and then select ProcessSettingsFactory as the process.

After that you'll see the Inputfields Definition File Path field show.

Link to comment
Share on other sites

13 hours ago, fruid said:

I tried that, FYI I see 

PHP Warning: Undefined array key "footer_imprint__1021" in .../modules/SettingsFactory/ProcessSettingsFactory.module:151

Yes i see that the lines that handle the languages (148-154) is not checking if the array key is set yet. Will have to add that check to prevent the warning.

  • Like 2
Link to comment
Share on other sites

I know I'm sort of preaching to the choir here, but it's a shame you cannot add images in SF. I think what many devs, me included ,want to use this module for is for global settings which includes things like logo(s). It just makes so much more sense to have these things defined in a separate page rather than by adding fields to the home template but maybe I'm just being too neurotic. 

Please forgive me if this is a dumb question, but since I have to create a page under the admin page tree to get SF to work, why can't I add images to this very site's /assets/files/ folder? But I guess the answer does something like because the fields I create on the required php or json file don't really exist in the system and are create at runtime?

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...