Recommended Posts

HELLO!

Thought of a super interesting module and wondered if anyone had created it or not, and some feedback on the idea.

New page field defaults - on creating a new child page, you choose a template and page title and click submit -> the resulting page is prepopulated with content dependent on the template you chose.

Not sure about implmentation yet just thought was an interesting idea.

Share this post


Link to post
Share on other sites

Moderator Note:

Moved thread to Module/Plugin Development forum. The forum Modules/Plugins is only for support of existing modules

  • Like 1

Share this post


Link to post
Share on other sites

@benbyf - not sure whether you mean real content, or dummy/placeholder, but if the latter, then maybe you want to check out: 

 

  • Like 1

Share this post


Link to post
Share on other sites

Awesome not seen that. Looks like my idea would be that but level 2.

Share this post


Link to post
Share on other sites
8 minutes ago, benbyf said:

Awesome not seen that. Looks like my idea would be that but level 2.

What exactly is level 2 :)

Share this post


Link to post
Share on other sites

Ha, I mean like that other module, but with more functionality, like level 2 in a game (its a saying, like leveling up).

Share this post


Link to post
Share on other sites

Like with beard?

Share this post


Link to post
Share on other sites
22 minutes ago, benbyf said:

Ha, I mean like that other module, but with more functionality, like level 2 in a game (its a saying, like leveling up).

I get the metaphor :) I was after the specifics of what additional functionality you are looking for!

  • Like 1

Share this post


Link to post
Share on other sites

Ah sorry, yes I was thinking that it might be nice to have a module that you can choose a template and for each field available to that template choose default values to pre-populate a page on creation. So the values are template depend not field depend.

  • Like 1

Share this post


Link to post
Share on other sites

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


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By jrtderonde
      Hey,
      I'm working around a module that adds pages in my ProcessWire installation. The pages are added based on a JSON array that will be imported through a page save. Everything works fine except for when the pages are added. I get the following error
      Integrity constraint violation: 1062 Duplicate entry '3e215ecd6774fd99c2b0eb5cadf36a07-1269' for key 'name_parent_id' I'm using the following code/loop to generate the pages.
      // Loop through the files foreach ($p->importFile as $file) { // Set the file location $name = $file->data["basename"]; $path = $p->importFile->path; $location = $path . $name; // Get the file $json = file_get_contents($location); $json = json_decode($json); // Loop through the rows of the import foreach ($json->ttEntityDelAddrLink as $client) { // Create new page $new = new Page(); // Create unique hash $unique = md5(date("Y-m-d H:i:s") . "-" . $client->CustomerCode); // Set some variables for the new page $new->setOutputFormatting(false); $new->template = "_client"; $new->parent = $p; // Create hash $new->title = $client->DelAddressName; $new->name = $unique; // Page specific fields $new->company = $client->DelAddressName; $new->companyId = $client->CustomerCode; $new->city = $client->DelAddressCity; $new->address = $client->DelAddressStreet; $new->postcode = $client->DelAddressZipCode; $new->country = $countries[$client->DelAddressCountryCode]; // Save the page $new->save(); } // Exit for debugging exit; }
      Does anybody know what's wrong?
    • By cosmicsafari
      Hi all,
      I have noticed that LazyCorn seems to run maybe once or twice and then just stops.
      Has anybody else encountered this, I have the following within 2 different modules.
      public function init(){ $this->addHookAfter('ProcessModule::executeEdit', $this, 'configurableButtons'); wire()->addHook('LazyCron::every15Minutes', $this, 'autoGenerate'); } public function init(){ wire('forms')->addHookAfter('ProcessModule::executeEdit', $this, 'configurableButtons'); wire()->addHook('LazyCron::everyHour', $this, 'getExport'); } Does having multiple LazyCrons setup cause any issues?
    • By maxf5
      Hey guys,
      whenever i install a new modul it works but when i want to go in the settings of the module i get an error:



      ProcessWire 3.0.72 
       
       
    • By benbyf
      Hello,
      Does anyone know whether the is a place detailing the structure your admin theme should take when creating one? e.g. I see UiKit, Reno and Default admin themes all have default.php, init.php, controller.php files, is this a stylisitic choice or a prerequisite for any admin theme module?
      Thanks!