Leaderboard
Popular Content
Showing content with the highest reputation on 10/20/2021 in all areas
-
It took a little more time this week to wrap up what I was finishing last week (and the week[s] before). But I think it's now at a good spot to move on to something else, and so I started with some Repeater and RepeaterMatrix updates. In Repeater, a new feature was added that's been requested for awhile: the ability to add items anywhere you choose. Previously you could do it only by adding items to the bottom, and then drag them in place. Now you can click insert before/after [icons] in each repeater item header and it will add the new item in place. It is also depth-aware. This is something that I think will also be useful especially for people using repeaters for page builder type contexts. (Note: the feature does not [yet] work if you have all Ajax features turned OFF in your repeater settings). There's a GIF screencast below that shows you how it works. You can click the "insert before" or "insert after" actions and it inserts a new item in place. Alternatively, if you hover either action for a second, it'll show you where it's going to insert an item and you can click either the the item, or the action, to complete the insertion. There's still likely some optimizations and improvements to make in the JS here but so far it seems to be working well. (I made this as a GIF but for some reason IP.Board won't accept it, so here's a YouTube embed instead): Everything in Repeater also gets inherited by RepeaterMatrix, so you'll find this feature there too. But it's not fully functional there just yet. That's because RepeaterMatrix items also have a "type", so I'm working on a new version of RepeaterMatrix that lets you select a type once you've chosen where to insert the item. Another related feature in progress in RepeaterMatrix at the same time is a dropdown/select option for choosing what matrix type you want to add for items. This is an alternative to the current list of links that appears at the bottom. The dropdown also gives you the option of having groups of related types. More on that soon, potentially next week. Thanks for reading and have a great weekend.1 point
-
I struggle to read alternative PHP syntax but it seems to me you haven't defined $currentKey before the condition at line #55. If exhibition work title is not equal to the page title, you have no $currentKey, hence incrementing it at line 59 throws the error. Defining/initing it earlier, before line #55 ought to get rid of the error. E.g. $currentKey = 0; Not sure that your code will still work as intended though, so you'll need to test.1 point
-
I've been using Bootstrap since 3.x compiling my own customised version from less with 3.x and then SCSS with 4.x I'm yet to jump to 5.x I've taken a look at Tailwind a couple of times, and the good thing is it seems to produce very small CSS, but the process of getting set up to compile a minimised version seems to be more complex and requires more tools than with Bootstrap. That's a one off I guess, and once you're set up then presumably it's straightforward. I do like Bootstrap's components. I'm a developer, not a designer, and when a client asks me "What can you make my website look like?" it's really handy to be able to say, "Here are a set of components you can pick from. I can change the colour, size and position any way you like." That's way easier than trying to explain the intricacies of CSS and that technically, I could probably make their website look like just about anything from dog's vomit to the crown jewels.1 point
-
the following is a transparent 1 px gif: <img src='data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==' ... If you use this as default src, together with the width and height attributes, the browser engine is much earlier ready (doc-ready). You ommit one extra server request per image, as the images default data is already available within the HTML. And the default data is thousand times smaller this way. All that speed up things drastically. To your other points: 2) As I understand the concept of srcset, you should use / load the smallest fit, and if the image should be zoomed / scaled up afterwards, the browser handles additional (re)loadings.1 point
-
The max number is relative to the size and availability of your database server. It also depends on how you set up your front-end output. For a short term solution, the first thing you need to do is to cache your front-end output as much as possible (without compromising the freshness of content of course). You can either use template caching or ProCache. Since you are on a shared host, you are at the mercy of the pool of sites/apps that are on the same vm. If you have the budget or want to have more control over how resources are being allocated, you might want to consider running your site on your own VPS. DigitalOcean, Linode, AWS to name a few. There are server provisioning management services out there that can help you with the set up. RunCloud, ServerPilot or Forge are some good examples.1 point
-
If I remember right, in such cases I use a URL field for external URLs and a page select field for internal (multilanguage) links. If the URL field is empty, the page select field is shown, if a (external) URL is given, the page select field is hidden (showIf). (In the notes of the URL field is a hint that clearing the field will show the internal page select field). In template files I first check if there is given a URL or if that is field empty, and according to that I display external or internal URL.1 point
-
@Ivan Gretsky Hooks have already been added for this, and I think they were present in the dev version I posted in the ProFields board a few months back? I don't remember for sure, but I'm trying to make everything hookable so that people can modify the output as needed, and will keep looking for additional opportunities for that as I build in more related features. @teppo Yes there's a renderAddMatrixItemLink() hookable method for this, and it renders a link for one matrix item type, and gets called for each of them. So you could change the output to be anything you want. This is already present, but with the changes being made, chances are another hookable method will be added related to this. @Pete If I understand correctly, this is already there. See the "Matrix types to allow for adding new items" on the "Input" tab when editing your matrix field. This can be configured in template context which enables you to specify some types for one template and other types for another, etc. @mlfct Thanks, I was able to reproduce that here too and have pushed a fix on the dev branch.1 point
-
@MrSnoozles thanks for your kind words. Yeah my main intent is to handle ProcessWire in a sane way with current "best-practices" in PHP Userland. Which includes things like Composer all the way Dependency Injection Migrations!!! Separation of concerns (hello Twig for example) proper Headless Content distribution Nice, I had the exact same thoughts so far ? I really like ProcessWire and it is my first go to whenever I need a MVP or an Prototype. But in the long run, or whenever I have more than 1 Developer working on the code the nightmare begins, atleast for me. I really dont know ? The main problem is the way ProcessWire is organized, as it was never intended to be used as Dependency in another Project. So yeah, right now, whenever @ryan is in production mode and pushes new Versions I have to manually update the codebase. The thing is, I started to develop Symprowire because I had a Prototype in ProcessWire which acted as a Proof of Concept for some client presentations. To develop the concept and bring it to production ProcessWire just wasnt enough, I learned it the hard way ? *cough* migrations *cough cough* So in the course of 1 1/2 year I ported the PoC to Laravel with the intent to use Laravel Spark as our Product is a SaaS with fully fledged Multi-tenancy. Unfortunatly Laravel Spark wasnt that good of a solution back in the days as it was too opinionated and the general direction Laravel as a Framework is developed... mhhh I would say is not my cup of tea. So I started to port over to Symfony as we worked with Symfony some years ago to develop a Marketplace supporting 72 Languages and had ~ 350 active sellers from the beginning. I would say it was a fairly big project and I felt confident to work with the Framework, but I missed ProcessWire's CMS/CMF possibilites which ultimatly brings us to Symprowire. As of today, we ditched ProcessWire completly from our Product and went full ham with Symfony as we are using symfony/notifier for async notifications symfony/messenger for RabbitMQ api platform for our headless needs and all the bits and pieces symfony brings To give you an idea, I just published a basic Fullstack Template covering all our needs. You can find it here: https://github.com/Luis85/symfony-full-skeleton Right now, I really dont know how to develop Symprowire or in which direction I would like to go with the Project. I have a lot of Ideas but every idea would be a complete refactor. I thought something like, yeah just copy the Data Modell ProcessWire uses and port it to Symfony to make a new CMS based on Symfony with the spirit of ProcessWire. I really dont know right now ? What I know is, I want to contribute to ProcessWire.1 point
-
@bernhard It might be something to do with your server's root certificate. Have a look at https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/ You can check if your root cert has expired or not by checking it here https://www.ssllabs.com/ssltest/ Update: I just ran your domain name and it looks like your DST root cert expired (per Let's Encrypt article above)1 point
-
Field that stores one or more references to ProcessWire pages with additional data in field context. Values are editable via page edit modal of the referenced page provided from the field if module AdminPageFieldEditLinks is installed and "Enable link to create new pages?" is checked in field settings. Requirements: AdminPageFieldEditLinks >= 3.1.4 https://github.com/kixe/FieldtypePageContextData https://processwire.com/modules/fieldtype-page-context-data/ Use case example: The planning of the Tonmeistertagung in the CCD (Congress Center Düsseldorf) from November 3rd, 2021 to November 6th, 2021 is in the finalization phase. The conference consists of a conference part and an exhibition. The planning is done via a separate frontendless PW instance. There, all companies (pages) that are active at various events are kept in a pool. Changes (address, logo) can always be done there. For the exhibition of the current conference in November, the exhibitor-companies (pages) are selected via a page reference field. A stand number must now be assigned to each selected company (page). We had originally solved this using the Profield FieldtypeTable. However, this had the disadvantage that each entry again made all companies available for selection and did not recognize which were already selected in a previous table row. The new field type now allows the value (company's stand number) to be assigned to a Company (page) in context to a specific Pagefield living in a specific page. https://tonmeistertagung.com/en/exhibitors/exhibition/1 point