Jump to content

DrQuincy

Members
  • Posts

    297
  • Joined

  • Last visited

  • Days Won

    1

DrQuincy last won the day on August 30 2023

DrQuincy had the most liked content!

Profile Information

  • Location
    UK

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

DrQuincy's Achievements

Sr. Member

Sr. Member (5/6)

79

Reputation

  1. If you want to use video directly on your site — as opposed to embeding from YouTube, etc — is just .mp4 generally okay now? I know you used to provide several formats but I just worked with a company that are just using <video><source src="video.mp4" type="video/mp4"></source></video>. Is that good enough? I tested on my various browsers and it all worked — even on my Linux machines.
  2. Yes, good point, I don't need two different child templates. Thanks.
  3. Thanks but I want to use different sorting dynamically though to avoid adding a separate template. One is news, most recent first. The other is events where the date would be ascending since the dates would be in the future. I hope that makes sense.
  4. I have a template that has a date field attached to it and I use this to reverse sort items. This works great for my blog feed. However, I want to use the same template for an events field. To save me managing an entirely separate template, is there a hook I can use that will uncheck the “reverse sort” checkbox dyanically? So: /blog/ sorts children per the template settings, most recent first /events/ uses a hook to display pages date order ascending Note I am only referring to the site tree in the admin. Obviously, on the front end I can easily use selectors to get the desired result. Thanks.
  5. And here's the answer to migrating large sites! Thanks Ryan. https://processwire.com/blog/posts/webp-images-on-an-existing-site/#implementing-the-webp-strategy
  6. If you enable webp, where the easiest way on a legacy site to get a webp version of every image in the CMS?
  7. Apologies, everything I need is here: https://processwire.com/blog/posts/webp-images-and-more/#webp-image-strategies-in-processwire
  8. This is a bit vague but I've always been behind the curve with regards to next-gen images. To those of you PW masters that use them I have a few questions please. 🙂 What is you preferred format? In 2024, do you still need to supply a jpg/png fallback? How to you manage this in PW given that support outside of the browser is quote poor. What I mean by that is while us devs can work with them easily, clients tend to only know what jpgs are. Thanks!
  9. Thank you, this one worked. I couldn't see for looking that the conversion was wrong:
  10. I'm tearing my hair out here. I have a Datetime field and whenever I use it in a selector — regardless of how I use it — no pages are returned. I've: Checked the field name is correct Checked the field type is correct Checked the selector is correct Tried multiple date formats as the selector value The field is called propertyEarliestDate. So, if I do: wire('pages')->find('template=property, propertyEarliestDate>=' . strtotime($myDate)); // $myDate definitely produces the correct Unix timestamp I get an empty array. If I change it to: wire('pages')->find('template=property, propertyEarliestDate<=' . strtotime($myDate)); I still get nothing — even though I have changed to selector to check the opposite. If I remove the selector all together it works. If I remove it, it returns some pages: wire('pages')->find('template=property'); There are definitely pages with propertyEarliestDate populated. Any ideas of anything I might be missing? Thanks.
  11. I have a template, product, that has a field, downloads. I want people to be logged in to access downloads but I also want role guest to view the page. When you choose the option to restrict access to a template's files it determines this, rightly, based on the options set in the Access tab. How can I make ProcessWire restrict access to downloads while at the same time making the actual page viewable by guests? So if you had /page/ that has a link to /site/assets/files/999/file.pdf, everyone could view the page but the file would 404 for guest - but be accessible for anyone logged in. Thanks.
  12. This is perfect. Nice and simple and just what I wanted, thanks.
  13. Is there an admin plugin to test out selectors? What I mean is, you'd have a text field where you can enter a selector and it gives your details of which pages would be affected/returned. I say “would be affected” as it would be useful to test out how live data would be affected so you can be 100% sure your selector is right. I hope that makes sense. Does such a thing exist? Thanks.
×
×
  • Create New...