Leaderboard
Popular Content
Showing content with the highest reputation on 11/20/2020 in all areas
-
There’s a new modules directory on the ProcessWire site now up and running. In this post we’ll cover a few details about what’s changed and what’s new. While last week's post introduced the modules directory, this post (part 2) focuses on newly added features for module authors (just pushed live today)— https://processwire.com/blog/posts/new-processwire-modules-directory/4 points
-
Thanks, I'm glad you like it. ? The "Admin theme settings (Uikit)" options don't exist for the standard Fieldset fieldtype (FieldsetOpen) so that wouldn't work, and in any case the location of the module settings fields doesn't determine whether or not they can appear in template context. But in the newly released v0.1.6 I have added support for defining the Minimal Fieldset settings in template context so this should cover what you're wanting to do.3 points
-
Sqlite might be a possibility, given it has pdo support and is still a sql database and even that is likely a lot of work for making the things currently expecting mysql as a db flexible. Going away from sql would mean needing to replace all the query building facilities, which basically hits almost all parts of processwire – I'd estimate that as at least a rewrite of half of processwire. And that's just the implementation. For actually making this a reality it would need extensive testing and ongoing maintenance efforts, both of which I doubt will happen – at least without any appropriate financial incentives.2 points
-
I've tried using Tailwind but the verbosity of the classnames was a killer for me. Then I tried using tachyons which I much preferred but didn't like the lack of configurability. Tachyons (which came LONG before Tailwind) never pretended to be a holy solution for managing css, it was clearly defined as a quick way to get ideas onto the screen, with the view that you would slowly strip out all the utilities into regular css as your design system evolved. On the flip side, what tailwind did right for me was the theming system, however as a diehard stylus user I found it frustrating I couldn't use the theme variables in my custom stylesheets. Based on the above, I wrote my own utility functions in stylus that could 1:1 replicate tachyons or tailwind (or a mix of the two / whatever you wanted), with a theme defined in stylus hashes that could then be used throughout my custom stylesheets, plus mixins that replicate a lot of the utilities, eg px(2). Even still, I found that generally I would generally only end up using a few of the utilities like spacing, text-align, display etc. These days I follow a methodology mainly based on https://rscss.io and https://piccalil.li/cube-css/, with some ideas from https://github.com/ahmadajmi/awesome-itcss thrown in. I have a theme that defines defaults, still use some utility classes whilst developing, but basically break things up into: - theme (this is very simple similar to https://github.com/hankchizljaw/gorko, generally it just has: colours, breakpoints, media queries, fonts, spacing scale ) - mixins (I use some flex-box grid, media query and spacing mixins and that is about it) - base (resets, classless base styles etc) - elements (semi utilities for type, links, buttons, input fields, sort of like bootstrap) - components (pretty much everything is a component following rscss conventions) - utilities (rather than a separate utility stylesheet I now output the ones I want to use at the end of stylesheet and slowly strip them out) Currently this is working really well for me although I am sure it will continue to evolve. One thing I also do is try never to change classnames with javascript, but instead use data-attributes. This way you can very quickly parse what javascript is doing in your html.2 points
-
Hi everyone, I'm happy to present my latest project, which is a collection of guides and tutorials for web development with ProcessWire written by me. https://processwire.dev/ What is this? I have written several tutorials in this forum, and I wanted a central place to collect all my tutorials and put them in a logical order. processwire.dev is exactly that, a curated list of tutorials for different topics related to ProcessWire development. I have revised, updated and expanded most of my existing tutorials. There are also some completely new tutorials. Notable topics How to integrate Composer in your ProcessWire sites, and a general explainer for namespaces and autoloading. A two-part guide to using Twig with ProcessWire and adding custom functionality. How to create flexible content modules with Repeater Matrix fields and Twig. A general guide to performance optimization for ProcessWire. A starter guide for the "ProcessWire mindset" - how to structure your content. ... and much more! What's next? I hope this will be a useful resource to all of you fine people. Please note that these tutorials are very much opinionated, and they reflect my personal experience and development practices. So if you disagree with some of my conclusions, that's perfectly fine! I'm happy to discuss all my recommendations and approaches with you, so let me know if you have any feedback, suggestions or error corrections! I plan to expand this resource over time and already have some new topics planned. If you have suggestions for new topics, go ahead and post them here as well! Start reading now: processwire.dev1 point
-
@Robin S Hi Robin. thanks for the clue about Tracy debugger and the right hook method. Solved my problem.1 point
-
Using Tracy Debugger to dump the name of the submit button can give you a clue... $wire->addHookAfter('InputfieldSubmit::processInput', function(HookEvent $event) { $inputfield = $event->object; bd($inputfield->name, "inputfield->name"); }); So there are two submit buttons in Page Edit that get processed: the Save button and the Trash button on the Delete tab. Rather than hooking InputfieldSubmit::processInput you can use the dedicated hookable method that performs the save actions: $wire->addHookAfter('ProcessPageEdit::processSubmitAction', function(HookEvent $event) { $value = $event->arguments(0); if($value === 'send_registration') { // Do your action here... } });1 point
-
To make a processwire version with a xml database would be a dream come true. How difficult would that be to make ?1 point
-
I just want to say I love this module. It means I can have repeatermatrices made up of fieldsets, while also using those fieldsets on their own elsewhere, with much less clutter. Thanks for making it! Would it not make more sense though for the provided option to be added to Input > Admin theme settings (Uikit) ? Then also it could be overriden from within a template/repeater field group. I think this would be really helpful because while you're likely to not want the title/padding when loading a fieldset within a repeater matrix, you're likely to want it when loading a fieldset in a more standard context.1 point
-
I made some progress with this, but I have some basic questions, because of some basic obstacles. Since the module I'm trying to build makes an AJAX-request, how can I call the file? Obviously I want to put the ajax-called file inside the modules/EventsCalendar/ folder, and not inside the root folder. My .js does the following at the moment which doesn't work for obvious reasons (forbidden): pullEvents.open("GET", "../site/modules/EventsCalendar/_loadevents.php?m="+m+"&y="+y+"&d="+d+"&view="+view, true); Also, I need to know how to include a javascript in that module. It's required for at least two of the class's functions. Is there a way to not require the user to add the <script type="text/javascript" src="/path/to/js/file/"></script> manually? How about css, how can I include that automatically? Ideally I want to put .php, .js and .css files inside the module's-folder and everything gets included with no further ado from the user. The user would just need to call the methods inside their markup, add some additional css if needed and that's it. Many thanks for help.1 point
-
@monollonom Thanks! I really recommend giving Twig a try, once you get used to it you can never go back ? That's actually an area I don't have a good solution for yet. The problem is that all the template and field configuration lives only in the database, so it's not easy to put under version control. The simplest solution is to include a database dump in the version control, but that is a one-way street. Diverging versions of the database dump are really awkward to merge, so it's impossible for multiple people to work on a project independently and merge their work into one repository later, because they will have different database states that can't really be merged liked diverging versions of source code. Also, it doesn't help with continuous deployment (developing additional feature in a dev environment and updating a live site), because importing the database dump would overwrite the actual site content on the live site as well. The other solution are migration modules like RockMigrations which encode all changes as config files or migration scripts. However, writing those migrations is just so much work, especially with all the field properties which aren't really documented consistently. Mostly it just doesn't feel worth it, especially since it doesn't really solve the problem of multiple people working on a project independently of each other. I'm not even sure if there is a great solution for this. Fundamentally I would prefer if the entire template and field configuration was file-based so it could be versioned. But of course that's a completely different system design.1 point
-
This is now possible using owner selectors! http://processwire.com/blog/posts/processwire-3.0.95-core-updates/ $pages->find('template=repeater_collections_detail_images, your_repeater_field.owner.collections_detail_designer=123, include=hidden, sort=name');1 point
-
You definitely should give them another try @AndZyk. Since your first post a lot of things changed. Am I really experienced? Maybe kind of. Ask me this when I finished the next 100 projects with lots of rich snippets/schema-markup. ? My examples and code snippets wouldn't be any different than any other resource out there. I really love this tool: https://technicalseo.com/seo-tools/schema-markup-generator/ You can create several kinds of markup as an example and implement them in your project. Those examples are a great starting point for everything. From breadcrumb to review or events. Test your markup over at Google and do what they want you to optimize in your markup: https://search.google.com/structured-data/testing-tool/u/0/ Check the schema.org definitions and guides for more details: http://schema.org/ Set up Google Search Console, check your markup with it and let Google crawl your optimized sites. Get reportings on errors and fix them fast. As written before: start with small parts of site (if possible) check results every 2 days for several weeks don't try to trick Google don't fake reviews don't fake review-counts or anything else If you are into Local SEO do the basics and create company and localBusiness markup with everything you can (logo, social profiles, site search, opening hours, ...), connect to Google My Business. Feel free to contact me or ask whatever you want. It's easier for me to answer a question right now.1 point