Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • Location
    Montréal, Canada

Recent Profile Visitors

2,513 profile views

mel47's Achievements

Sr. Member

Sr. Member (5/6)



  1. OMG, thanks so much. Apparently I skip this (closed) option.
  2. Hi, Just update to 3.0.226 this weekend and my content screw up. I'm unable to avoid div to get strip of code editor. I try "extended_valid_elements" : "div" but without success. How I can achieve to keep div in TinyMCE? Thanks!
  3. Oh, yeah, I was thinking in term of <picture> not PageImage. But it works now by changing as suggested. Thanks!
  4. Hi @nbcommunication I discovered the benefit of srcset tonight and it's easier with the module! Thanks. I have a question. How can we manage "art direction" with the module? I had this 2 image sources but I don't know how to implement using module's API : <picture> <source media="(max-width: 799px)" srcset="<?=page()->rootParent()->image_haut_mobile->url?>"> <source media="(min-width: 800px)" srcset="<?=page()->rootParent()->image_haut->url?>"> <img class="image" src="<?=page()->rootParent()->image_haut->url?>" alt=''> </picture> Thanks! Mel
  5. Hi I installed a new instance of PW (3.0.200) with default settings for database. So the database is : utf8mb4_0900_ai_ci However I use french language and when I use code button for TinyMCE I have things like &agrave; etc... But not for fields using CKeditor. Is it the new behavior, a bug or I have to change something somewhere? Thanks Mel
  6. Hi, I advanced a little bit but I'm still stuck... 🙃 I used templates to add this code, works fine! However, whatever I do, when I save the page, the class disappear from code. I tried to add those classes in "extra_css" in TinyMCE options, but didn't help. In CKeditor, it have an option to allow some classes to be not striped from code. Does is have this option for TinyMCE? Thanks Mel
  7. Hi, I know this subject has already been discussed, but I was wondering if TinyMCE will simplify things. I want to do a editable text by users in a 3-columns layout for a specific page, in the middle of some content. The content of the page is a simple body field with CKeditor/TinyMCeditor (not decided yet). Columns are managed by CSS, something like : <div class='columns'> <div class='column is-4'> <div>Text/image to edit</div> </div> <div class='column is-4'> <div>Text/image to edit</div> </div> </div> What is the best way to achieve this inside the editor? Or it's better to create own field for each column, so code will be in template? Thanks
  8. Hi I'm trying to create a markup of a list of options in 3 differents columns. I'm not sure how to do it. For now, I'm able to display each title: $field = wire('fields')->get($instru); $instruments = $field->type->getOptions($field); foreach ($instruments as $inst) { $out .="<li><h5 class='title is-5'>{$inst->title}</h5></li>"; } But I want something like this. Does it make sense? Or what other strategy I should aim? $field = wire('fields')->get($instru); $instruments = $field->type->getOptions($field); $firstCol = Options 1 to 5 // how to do? $secCol = Options 6 to 10 // how to do? $thirdCol = Options 11 to 15 // how to do? $array = [firstcol, seccol, thirdcol] foreach ($array as $col) { $out .="<div class="column">"; foreach ( ?? ) { $out .="<li>title</li>"; } } Thanks!
  9. Hi! I wondering if we transliterate any type of field. In fact, I want to transliterate titles from a fieldtypeOptions. I didn't work, however it's works well for a text field. Thanks!
  10. Thanks! I tried many versions, but apparently I missed those ones... ?
  11. Hi, Thanks. I put what I've done but it didn't work and I'm not sure it's the best way. function renderBio(PageArray $items, string $categorie) { $out = ''; foreach ($items as $item) { $photo = ${"$item->image_".$categorie}; //should be $item->image_director $bio = ${"$item->content_".$categorie}; //should be $item->content_director $out .="<div class='article columns is-multiline border-horizontal is-vcentered'> <h3>{$item->title}</h3> <div class='column is-3'> <img loading='lazy' src='{$photo->url}' alt='{$photo->description}'> </div> <div class='column is-9'>$bio</div> </div>"; } return $out; }
  12. Hi, Unfortunately I can find what is the problem. I don't think it's related to my templates, since it didn't work even in Tracy. In my previous project, the same code render correctly a menu. Same PHP version 7.2 (localhost) but different versions PW (3.0.206 vs 3.0.188). Mel
  13. Hi, For my new project, I'm trying to increase my optimization skills... So I have a template with fields Name(title) content_director photo_director content_prof photo_prof etc... I want to write a function to render a identical markup (renderBio(PageArray $items, string $category)), but for pages director or prof. However I tried many ways and I'm not sure how to do. I could do it with many IF but I would prefer an other solution. I tried to concatenate $item->content_ and $category but can't found the appropriate set of {}, "" or ''. If not I could use an array, but I'm not sure what to add in. Or maybe find fieldname ending with $category? What solution would you preconize? Thanks. I'm eager to see your solutions! Mel
  14. Hi, Just to say that I'm quite interested by an answer to be give to @Greg Lumley since I have the exact same problem. I used this module in previous website so I was thinking to know how to use it... Thanks (using latest 0.2.7 on PW 3.0.205)
  15. Sorry to come back again on the subject, but does someone have an idea why we can't see data if we are logged as admin? Before (unfortunately, don't remember which PW version it was), it was displaying correctly. I'm willing to modify anything : role, permission, module to get it working. I just want to avoid to give super-admin rights. Thanks Mel
  • Create New...