Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. You need creating form using dynamic row <input type="text" name="fieldname[]"> Then, using this php code to fill the repeaters <?php $fields = count($_POST['fieldname']); $p = new Page(); $p->template = 'template_name'; $p->parent = $pages->get('/parent_name/'); $p->name = 'page-name'; for ( $i=0;$i<$fields;++$i ) { $repeater = $p->repeater_name->getNewItem(); $repeater->field_in_repeater = $input->post->fieldname[$i]; $repeater->save(); } $p->save();
  3. Today
  4. You might be interested in my "cheat sheet" posted over here: https://processwire.com/talk/topic/23641-markup-regions-pw-vs-data-pw-different-behavior/?tab=comments#comment-201538
  5. Hi all, I took over an old system with - debian 9.13 (stretch) - php 5 - pw 3.0.123 And I tryed to use the installed duplicator. It did not work like I would expect it (on my personal machines it workes). So I installed php7 and the latest version (1.4) of duplicator. After that I get this messages (below) in the front end of the package manager page but in the info box (duplicator config page) I get Package(s) found › 1 Package Manager. So the built file is there on the server but not displayed in the front end. And the file is just containing paths (shown below) And in the backup directory there is a file 2021-07-29 ...zip.log with many paths in it, like Does anyone have a clue?
  6. Hello. I have a problem regarding getting the selected select field value in a hook after a form is submitted but before the email is sent. I tried different ways: $form->getChildByName('store'); $form->getChildByName('store')->get('value'); $form->getChildByName('store')->get('selected'); When i dump these with bd() i get a result only on the first line. The other two returns 'null'. I looked everywhere on the forum, and documentation but can't figure out how to get the selected value. Thanks in advance. Daniel
  7. After every login I receive this mail: Hi kaz, You just logged in from a device we haven't seen you use before. Browser and Mac are always identical …
  8. Same way except I like to put it within the Home page, under a Website Options tab.
  9. Yesterday
  10. That sounds perfectly fine to me. Thanks Teppo!
  11. Thanks! Looking forward for to see the video. I am sure that just looking at the list of available sections/components and Mystique configs can give me a lot of inspiration. And that part about automatic fields setup sounds magical. Is that base module or some of its parts open to read the code? Sorry, got too exited))
  12. teppo

    Snippets

    Priority numbers and PHP code support / Hanna Code integration are now logged as enhancements in the GitHub repository. I've got another project on my desk right now, but should have some time to work on these soon(ish) 🙂
  13. I'd totally love that! HANNA is almost everywhere I go... so in my case that would be a perfect match. And therefore I'd support that thought. I'd be perfectly fine with those solutions as they are PW-native of some kind - at least in my setups. But sure... I'm open to other and even better options and solutions.
  14. teppo

    Snippets

    Seems like it would be worthwhile to add priorities to snippets 🙂 I have considered allowing the use of Hanna Code tags in snippets. Would that make sense for your use case? I'm not against other approaches, but this would be one way to keep Snippets relatively simple, while still allowing for more advanced use cases. Maybe 🙂
  15. I just want to confirm that this module is awesome! And it does exactly what I needed. I was able to move quite a few things from my templates into this module and even added this to a live-project today in order to be able to maintain JSON-LD/schema.org snippets much easier. To be fair... you need most of the data in your pages and have to have quite a good structure to use the selector option in the module settings and such but... it works perfectly fine. A quick outlook to those that want to play with this module: If you need a special order for your snippets to load, you can tweak and change this with the snippet names. AAA renders before DDD and don't use numbers as 110 comes before 90. A name change later on won't help. ;) So just in case you have different JS/CSS before </head> or something similar. @teppo is there something on the way or planned in regards of PHP code within those snippets (if/else, ...) or to support variables from within _init.php and such?
  16. I'll make a video of this in the near future but here's the extremely short version of the page builder journey I went on. There are 2 approaches that ultimately make sense: section-based and component-based Section Based: This is the "intended" way repeater matrix (and similar fieldtypes in other CMSes -- WordPress ACF has flexible content, Craft has Matrix) is supposed to be used. Each matrix-type represents a section with the necessary fields to populate that section. No depth. Pros easy for editors to understand they just need to put in the content and it will work; no need to worry about layout because it's baked in; hard to mess up Cons not flexible / requires a lot of discussion to make sure all sections, fields and their variations are covered can't move content from one section to another can lead to field bloat Component Based: Each matrix-type represents a component (headline, text, image, video, description list, etc.). Furthermore, 4 additional matrix-types for layout: section, container, row, column. Depth is enabled as well as the new "family friendly" option which I pushed Ryan to implement earlier this year and makes this approach more usable. Pros extremely flexible; closely follows YOOtheme Pro's approach but in a matrix-way can move content anywhere Cons higher learning curve compared to section-based since layout and nesting is involved structures must be repeated over and over again since each component is independent uses many more pages behind the scenes -- Which approach is better? The answer is it depends on the nature of the content of the site and the technical ability of editors. If the site has a level of consistency from page to page, the section-based approach would work better. However if there is less consistency and/or the editors need and/or are willing to put in extra effort to build truly unique pages, then the component-based approach makes sense. The thing is, you can actually use both approaches. The matrix field name for the section-based approach that I use is called 'sections' and the component-based approach field name is called 'builder'. My base module sets up these fields automatically and uses Mystique for all the settings. You can add both the 'sections' and 'builder' fields to a template and the editors can decide which one makes more sense given a page's needs.
  17. Did you remember to update your password to the new one in your ProcessWire config file (/site/config.php)?
  18. Hi, I played around with my Mysql-database and because I did not remember that database-password, I entered a new one. After that my website throws an 'Internal server error'. Any help?
  19. @horst I have never used the combo field. This is interesting, I tried to test it. I have defined a combo field 'setting' with a few subfields, company (setting_company), name, street, and so on. I created a template with these field, and assigned it to a new page. The echo is not working, I can't get the data. No error message, it just keeps empty. echo $page->setting->setting_company; echo $pages->get('1052')->setting->setting_company; The first line (Using your Combo field from template files) I have from: ProFields: Combo field. How do you retrieve the data, from the page, from the template, from the field?
  20. Thanks for clearing that up — you've been a huge help to me. 🙂
  21. No, not under normal circumstances it won't. $session->CSRF->validate() will only ever reset the token in case an invalid token was provided, or if the token was initially created as a single use token (via $session->CSRF->getSingleUseToken()).
  22. Following up on this: after taking a look at that example I've realized that... it doesn't work. Thanks for pointing this out — I should probably fix it to avoid any further confusion 😄 In this case the search method of the controller class disables layout and attempts to change the view. First one is doable (layout is rendered after the view), but the second one isn't, since at this point we've already rendered the view (search method is called in the view, after all). Instead this should be done in the init method (triggered as soon as a controller class is loaded) or the render method (triggered when a page using that controller gets rendered). The distinction between init and render usually doesn't matter 🙂
  23. Ah right, thanks for the clarification. 🙂 Just to be clear though, simply calling $session->CSRF->validate() will not reset the token, will it? That's all I'm doing, which I guess is a custom CSRF check. Thanks!
  24. Sorry, my post was vague on this part (updated now): CSRF token is only reset if/when a reset was specifically requested while validating the token. Page save won't do this, but a custom CSRF check could do it. Only core feature (that I'm aware of) that resets the token is logging in... which is unlikely to occur multiple times during single browsing session 🙂
  25. Great job and write-up @Jonathan Lahijani! Could you expand a bit on the RM based content builder? Maybe even post some screenshots or even videos, if that is allowed by the customer. We had a great conversation about content builders in the beginning of the year. And you are a named expert in the field, so would love to read/see/watch anything more detailed from you.
  26. I prefer wireIncludeFile because of these points described by Ryan in his blog post: The foo variable is just an own variable you can pass and use in the included file. This way you can keep track where you added variables. Of course Markup Regions are also awesome and I like to combine Markup Regions with wireIncludeFile. I use Markup Regions for the whole blueprint of the templates and wireIncludeFile to split up large junks of code. Occasionally I use field templates for repeating fields markup. ProcessWire offers many ways to structure your code if you want to. 😀
  27. Last week
  28. I developed the new Geffen Playhouse website over the course of 2018/2019 and launched it in September 2019. It has been perhaps the largest project I have been involved in. The Geffen Playhouse went through an entire re-branding done by Base (including a custom font), and I worked with Teak on the new website. Website https://www.geffenplayhouse.org/ Wikipedia https://en.wikipedia.org/wiki/Geffen_Playhouse Base write-up https://www.basedesign.com/work/geffen-playhouse-always-geffen-playhouse-always-new Teak SF write-up https://teaksf.com/work/geffen-playhouse-ticketing-ecommerce-website-design/ Another write-up: https://www.laurentakayama.com/geffen Their previous website was severely antiquated and it wasn't a responsive website (as of 2019!). Instead, it forwarded mobile users to a "mobile-friendly" website on a different subdomain, which I think was hosted by a third party service. However the data containing all the actors, shows, seasons, news and press articles were all in there. So one major aspect of this website was de-duping and importing their data into ProcessWire, along with some post-import cleaning… that's ~25 years of data. The site is built with UIkit 3 for the most part, and also uses FullCalendar for the large and small calendars. There is a custom integration with AudienceView, their ticketing system, which is used to import all the performance showtimes of their shows into ProcessWire. It's not the easiest API to work with (XML), but I eventually got it working. Repeater Matrix is being heavily used for section-based page building. Building out all the necessary matrix types took a long time as there was quite a bit of thinking what types and layouts we needed as we went along. However the end result has given the editors a lot of flexibility. ProCache is being used as well, including a CDN for all assets. This is crucial because when opening season sales are announced, the site gets slammed, but with caching turned on, it's not a problem anymore. On a deeper level, the site uses my new (well 2 years old now), universal and very opinionated base module that provides a menu builder, a standard set of fields/templates/pages, and a bunch of other tweaks that I tend to use on every site. All the fields, templates and pages are set up in a streamlined and editor friendly way. I wasn't able to access their previous CMS backend for various reasons (I only got the MySQL dump), so when developing the site and data model in ProcessWire, I was able to completely re-envision the editor experience and the data model without bias. A quote from one of the marketing directors at Geffen Playhouse: "We absolutely love ProcessWire."
  1. Load more activity
×
×
  • Create New...