-
Posts
2,008 -
Joined
-
Last visited
-
Days Won
21
Everything posted by dragan
-
For a long time, Twitter didn't care too much about a11y at all. Their most prominent open-source FE product Bootstrap wasn't all that accessible until v.4. With earlier versions, you'd have to use the Paypal a11y plugin for their JS components. I don't want to open another "Pandora box", but I recently wrote about accessibility and its many pitfalls on the web, and one of the points I made is that a blind faith in FE frameworks can be dangerous. Just because a framework/library is very popular, doesn't mean it's all "plug and play" and covers everything (you mean) it should. </sorry-for-slightly-derailing>
-
Sure, why not? Perhaps you don't even need a module for this. Just some custom HTML with an anchor .pw-modal which opens your page. With one of the three "runtime markup" modules that would be easy to do, I guess: https://processwire.com/talk/topic/21982-rockmarkup-inputfield-to-easily-include-any-phphtmljscss-in-the-pw-admin/ (this is the latest one of this kind, afaik). Is your general goal to have something like a central image library for often-used assets?
-
Welcome to the wonderful world of "modern" SPA frameworks (React et al) !
-
I don't know if this helps, but in a simple test setup I got this to work: In the field settings "show only if..." > show only if custom PHP returns true: $rep = $page->textblocks; $c = $rep->count() -1; $last = $rep->$c; if($last->depth > 2) { return true; } Basically, I check the number of entries in a repeater called textblocks, then get the last (deepest) one, and check if depth is bigger than 3 (2, since it's zero-based).
-
Something like this?
-
What do you mean with "custom template to add markup for images..."? The output is just XML. Why would one browser display another XML? That makes no sense. Do you mean "if logged in as superuser I see another XML as when not logged in"? Also, maybe you should have posted in the module support threads instead: https://processwire.com/talk/topic/799-module-xml-sitemap/ https://processwire.com/talk/topic/3846-how-do-i-create-a-sitemapxml/
-
Well, then just remove that line. If you're deleting, it makes no sense anyway.
-
Well, does it work if you run it normally (not as cron job)? Do you get errors? What are the permissions of the page this runs in?
-
@Hurme Did you check your server error logs for hints? Or site/assets/logs/ ? First of all, you could try to delete everything in site/assets/cache/modules/. If that doesn't work, rename the REST API module: prepend a dot (.modulename).
-
Are you familiar with page reference fields? Are you already using them? Assuming you are already using them, I guess you want cross-references in both directions. In that case, take a look at this module: https://modules.processwire.com/modules/connect-page-fields/ From the API side, there's also this relatively new method: https://processwire.com/api/ref/page/references/
-
How to make a custom class globally available
dragan replied to chrizz's topic in Module/Plugin Development
I never had to deal with it myself, but check out Ryan's announcement. -
Displaying the most recent blog posts using different layouts for each
dragan replied to mike62's topic in Getting Started
@MilenKo You could try modulus, or a good old counter var. -
Displaying the most recent blog posts using different layouts for each
dragan replied to mike62's topic in Getting Started
If it's just styling, you should first try a CSS-only solution. You can do a lot with just :nth-child or flexbox. -
I don't think that would make any impact on filtering and search. If anything, it would only make your setup more complicated than it needs to be. You would have to take care of creating year/month/day parent pages with each new record (or create them ahead of time).
-
err, I should have googled this before answering... (I had no idea what ESP means). So it's data from one single weather station only? My above post was based on the assumption that you get weather infos from all over the world via some 3rd-party API and you update your site via cron jobs. It's been said time and again that a big number of PW pages will scale well, but a combination of (too many) fields, templates, and pages - plus complex queries - can seriously impact speed. In your case, the setup seems to be quite simple though, so I would go the "native PW route". However: When it comes to loading huge data-sets and visualise them (aggregate a 5-year-span of weather data and create statistics or curve diagrams), I would surely look for RockTabulator or some such. You can fake a future situation yourself with simply creating thousands of dummy data-sets.
-
The majority (everything?) of the content is automated via imports, and you have practically no use for the whole PW admin backend? If so, I'd surely go the custom-mySQL-tables route. In PW, do your visualisation stuff (pulling raw data from mySQL). Perhaps you'd only have to build 1 page per location, and then use the location-page-id as a foreign key in mySQL. If you expect huge traffic, then a proper caching strategy would be essential. Do you plan to have some sort of search / filter on your site?
-
@BFD Calendar It's certainly none of my business, but don't you want to optimize your site a bit? For starters, it takes ages to load. It's also not responsive. Your homepage is a whopping 24MB. You're loading JS in the <head> instead of the end of your <body> etc. The pattern backgrounds makes reading content hard. Images don't have an alt attribute. Google doesn't like slow and non-mobile-friendly sites, and chances are, your users won't either. https://search.google.com/test/mobile-friendly?id=Os-IXOq4pmJaFuqLUSb8xQ https://developers.google.com/speed/pagespeed/insights/?hl=de&url=https%3A%2F%2Fwww.birthfactdeathcalendar.net%2F The long homepage e.g. could make use of some lazy loading technique - it ain't that hard to do. I don't know what else is slowing down the site (TTFB is over 7 seconds, which is really bad)... maybe un-optimized PW selectors?
-
Get page with a specific template of root parent
dragan replied to Stefanowitsch's topic in API & Templates
Did you debug it with Tracy? Check whether you need parent or rootParent, and your template and field names. -
Did you check the Apache error and access log?
-
I just added a new Uikit3 / Minimal Profile for ProcessWire 3x
dragan replied to rafaoski's topic in Themes and Profiles
-
@ttttim This module was just released yesterday... maybe take it for a test-drive?
-
$pages->find() get by id and maintain order
dragan replied to Torsten Baldes's topic in API & Templates
Did you try someting like $unifiedMatches = $pages->find("id=$find1, limit=$limit")->add($pages->find("id=$find2, limit=$limit")); ? Seems to work with a quick test here...