Jump to content

lenoir

Members
  • Posts

    146
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling
  • Location
    Basel, Switzerland
  • Interests
    Night Swimming

Recent Profile Visitors

4,711 profile views

lenoir's Achievements

Sr. Member

Sr. Member (5/6)

26

Reputation

2

Community Answers

  1. I use SVGs a lot as images too, but in some cases I want to be able to interact with some elements in the SVG (change the colors, animate elements with CSS, etc.), and you can't do that if they're inserted within an <img> tag.
  2. Actually a good point, thank you. I was getting an error message on another device, so filename is probably cleaner. You think there's better way to get the SVG without the http GET?
  3. Thanks to you two! 'path' didn't work either, but put me in the right direction. I used httpUrl instead of url and that worked. See full code here: foreach($page->textblocks_repeater as $content){ if(count($content->images)){ echo file_get_contents("{$content->images->eq(0)->httpUrl}"); } }
  4. Hi, I'm often struggling with placing SVG images as SVGs (not within an img or object tag). I'm getting the following error message: Warning: file_get_contents(/site/assets/files/1022/schlaeger_1.svg): Failed to open stream: No such file or directory Here's my code: echo file_get_contents("{$content->images->eq(0)->url}"); ($content is a repeater) What is the correct way to place a SVG image as SVG (I really need it as a SVG). Thanks!
  5. Great module!! It's funny how very often one expects a complex solution to a problem and stumble across a very simple ProcessWire module 😅. Still, I've having timeOut issues importing a simple CSV (1.3Mb) after 77 pages already. Expecting to import >2000. What's the workaround? I've installed Tasker, but I'm not sure how it works. Can anyone help me? Thanks!
  6. Ooh… i didn't know about these settings! Thanks a lot, that's exactly what I needed…
  7. I need to display a datetime field next to the title of the page on the tree list. I've used the following code in the ready.php file previously, but it's not working anymore. Also, I'm looking at displaying the date on the tree, not in the search. Am I doing something wrong? Unfortunately I'm not familiar with hooks… $wire->addHookBefore('ProcessPageSearchLive::execute', function(HookEvent $event) { $event->wire()->addHookAfter('FieldtypePageTitle::wakeupValue', function(HookEvent $event) { $page = $event->arguments(0); if($page->template == 'event') { $suffix = $page->datum; $event->return .= ", {$suffix}"; } }); });
  8. Hi, I need to export a JSON once a day automatically. It should contain a whole set of pages and their direct subpages: Agenda -> Play 1 (text, images) -> Play 1 date 1 (diverse fields, datetime) -> Play 1 date 2 -> Play 2 -> Play 2 date 1 … I'm not sure where to do this and where to save the JSON file. I'm thinking of a hook in ready.php but I haven't done this before, so I'm a bit cautious. Thank you for your help!
  9. Link to the module page is broken – is the module still working with the latest PW version?
  10. Ok, I wrote the php codes from scratch and now it works. Very strange. Definitely a mistake from my part. Thanks for suggesting Tracy Debug, I'm testing it right now ?
  11. Oh I didn't know this. I actually started calling all my repeaters "repeater_…" but that might not be the brightest idea in that case. But I find sometimes forget which fields are repeaters and which aren't, that's why I started doing this. But I guess this isn't the problem, since I'm pointing to the right field.
  12. I don't get your point, sorry. I don't see what this has to do with my issue?
  13. yes, my repeater is called "repeater_agenda" and has 2 fields, title and a datetime called "eventdate".
  14. Hi, this seemed quite straight forward, still can't get my head around it… I have a repeater with 2 fields (title and datetime). I want to sort the repeater items in the API by the datetime field. But it doesn't work. foreach($page->repeater_agenda->sort("eventdate") as $agenda){ } This doesn't do anything. Am I missing something?
  15. Wow. These are great inputs! I'll have to look into them more closely, since they are some new concepts to me. I only feel stupid I haven't asked the community sooner ?
×
×
  • Create New...