Jump to content

pwired

Members
  • Posts

    2,318
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by pwired

  1. Hi,
    I am using the core Comments fieldtype in Processwire.
    It has the default Form input labels Name, Email and Text.

    This question has been asked before but I found no answer in the Forum section.
    How can I add extra input labels to the Comments Form such as Country, Year. etc ?

  2. Quote

    So it now does that and it also links to a new page that describes all of the past and current site profiles, along with additional details on how to create and install site profiles ..... added just by having a profile-specific finishing file, for those that want it. So if you want your site profile to perform any other types of customizations on top of what you can already do with a site profile, this is the place to do it. 

    Hi Ryan, Big thanks for doing this, as it adds to beginners friendly and jump start with Processwire.

    Merry christmas to the Processwire Family

    • Like 5
  3. Quote

    This cuts the size of the core in half, going from 15.5 MB down to 7.5 MB, which is quite a slim down!  
    This means the site-regular, site-default, site-beginner, site-languages, and site-classic now live in their own dedicated repos on ProcessWire’s GitHub.

    How many processwire users find this NOT useful ? Some user base polling or voting would be on its place.

    For so many years having these profiles out of the box added to beginners friendly and jump start with processwire.

    • Like 4
  4. Quote

    The problem is, that the accordion nav solution from UIkit converts all parent pages into accordion triggers.
    I've seen other solutions, where only the arrow or plus icon is the trigger and the name is the link ......

    You can keep on using UIKit but it is not a silver bullet solution for any situation. Find any mobile menu/accordion navigation
    on jqueryscript dot net for free with code examples, and demos ready for you to use with processwire.
    Have a look here: https://www.jqueryscript.net/

     

    • Like 1
    • Confused 1

  5. 1)
    What about keeping the main layout styling in vanilla css and put only utility classes for final layout tweaking ?
    That would give you the best of 2 worlds !

    2)
    Having said that, how many percent of all the available tailwind utility classes are really going to be used ?
    Certainly not all of them in every website you make, let's say 40% - 50% - 60%  ?

    3)
    That brings me to the idea to sort out only the most useful ideas and classes from Bulma, Spectre and Bootstrap
    and bring them in your own utility class framework. That would make things certainly more effective.
    How much time would that take ? Sticking to only essential and useful classes, not that long.

     

     

  6. Quote

    You really have a virtualmachine with Windows for each and every project you work on?

    Ever worked with VirtualBox, VMWare, Proxmox, other ? You build only once a virtualmachine
    with all your preferred programs, languages, libraries, tools, utilities, components, snippets, etc. etc.
    You use that virtualmachine as a Template. After that it is simply cloning the Template for each Project.
    It's like having multiple laptops in a single laptop ?

    • Like 1
  7.  I do not have Windows since I am not fond of it either. 

    We'll you can't beat Laragon5, HeidiSQL and WinSCP when it comes to Windows ?
    I manage every project in it's own virtualmachine, I run every virtualmachine
    from a simple usb3 2Tb external hdd ... all very practical.

    • Like 1
  8. Another very good example of how to handle parts of a website efficiently in processwire "as a page"

    I was building a website from scratch lately and was fiddling my css around to look for a way to get it better organized.
    And then came across this post from Diogo again:

    https://processwire.com/talk/topic/2210-help-getting-a-custom-styles-php-file-working/?do=findComment&comment=20641

    Quote

    1. Create a template file css.php and put all your css code inside. On the top of the file put this code <?php header("Content-type: text/css"); ?>.

    2. Create a "css" PW template with that file.

    3. Create a "css" page and give it the "css" template.

    4. Link to the stylesheet like this <link rel="stylesheet" href="<?php echo $pages->get('/css/')->url; ?>">.

    5. use the PW API on your stylesheet ?

    Extra:

    6. put some fields on the "css" template and use them on your css

    Examples: the color picker field for colors; an image field with your style pictures (background, logo, etc).

     

     

     

     

     

     

  9. I was addressing your first question

    This is a different question

    Quote

    I was looking for a way to make template with fields programatically.

    Have you read the Processwire Documentation ?
    Your answers are here:

    https://processwire.com/docs/start/variables/templates/

    ---------------------------------------------------------------------
    Creating a new template with api

    <?php namespace ProcessWire;
    $fieldgroup = new Fieldgroup();
    $fieldgroup->name = "something";
    $fieldgroup->add("title"); // add some fields
    $fieldgroup->add("body");
    $fieldgroup->add("summary");
    $fieldgroup->save();
    
    $template = new Template();
    $template->name = "something"; // must be same name as the fieldgroup
    $template->fieldgroup = $fieldgroup;
    $template->save();

    ---------------------------------------------------------------------
    Adding fields to a template with api

    <?php namespace ProcessWire;
    $template = $templates->get("some_template");
    $template->fields->add("body"); // add some fields
    $template->fields->add("summary");
    $template->fields->add("images");
    $template->fields->save(); 

    ---------------------------------------------------------------------

    Forum
    https://processwire.com/talk/topic/4921-how-to-create-template-file-using-api-under-a-module/
    https://processwire.com/talk/topic/352-creating-pages-via-api/

    Examples
    https://processwire-recipes.com/recipes/add-fields-to-template/

    Beginner mistakes
    https://processwire.com/talk/topic/19415-trying-to-create-field-using-api/

     

     

     

     

     

    • Like 3
    • Thanks 1
  10. Hi MarkE,
    Thanks for pointing to an example use of this.
    Yes, with some easy business logic on the template file we can make the _main.php
    choose what footer type/content to show in what case or on what front website page.

    I am also playing with taking the header lines out of the usual _inc file
    and move them into "a header page" fields and see how that goes.

×
×
  • Create New...