Jump to content

mel47

Members
  • Posts

    361
  • Joined

  • Last visited

Everything posted by mel47

  1. Hi I have a simple question but I'm unable to find answer. I have a summary field with CKeditor. When I want to render this field, It always get wrapped by a <p>text</p>. But I don't want those paragraphs. How to remove them? If I use $sanitizer, it also removes other tags (<a>). Thanks
  2. Oh, my, my... I read it but it appears I didn't completely understood... So solve my problem by replace with $menu = $modules->get('MarkupMenuBuilder');//Load the module. $menu is an example $m = $pages->get(2359); echo $menu->render($m, $options);
  3. Hello, I recently installed MB on my multi-language's website in progress. I'm quite sure it was working in both languages. But since couple of days, I noticed this error Exception: No menu items found! Confirm that such a menu exists and that it has menu items. (in /multimedia/sites/dev-wire/site/assets/cache/FileCompiler/site/modules/MarkupMenuBuilder/MarkupMenuBuilder.module line 961) #0 /multimedia/sites/dev-wire/site/assets/cache/FileCompiler/site/modules/MarkupMenuBuilder/MarkupMenuBuilder.module(88): MarkupMenuBuilder->throwError() #1 /multimedia/sites/dev-wire/site/templates/_main.php(194): MarkupMenuBuilder->render('main', Array) #2 /multimedia/sites/dev-wire/wire/core/TemplateFile.php(276): require('/multimedia/sit...') #3 /multimedia/sites/dev-wire/wire/core/Wire.php(374): ProcessWire\TemplateFile->___render() #4 /multimedia/sites/dev-wire/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___render', Array) #5 /multimedia/sites/dev-wire/wire/core/Wire.php(402): ProcessWire\WireHooks->runHooks(Object(ProcessWire\TemplateFile), 'render', Array) #6 /multimedia/sites/dev-wire/wire/modules/PageRender.module(514): ProcessWire\Wire->__call('render', Array) #7 /multimedia/sites/dev-wire/wire/modules/PageRender.module(514): ProcessWire\TemplateFile->render() #8 [internal function]: ProcessWire\PageRender->___renderPage(Object(ProcessWire\HookEvent)) #9 /multimedia/sites/dev-wire/wire/core/Wire.php(376): call_user_func_array(Array, Array) #10 /multimedia/sites/dev-wire/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___renderPage', Array) #11 /multimedia/sites/dev-wire/wire/core/Wire.php(402): ProcessWire\WireHooks->runHooks(Object(ProcessWire\PageRender), 'renderPage', Array) #12 /multimedia/sites/dev-wire/wire/core/WireHooks.php(782): ProcessWire\Wire->__call('renderPage', Array) #13 /multimedia/sites/dev-wire/wire/core/WireHooks.php(782): ProcessWire\PageRender->renderPage(Object(ProcessWire\HookEvent)) #14 /multimedia/sites/dev-wire/wire/core/Wire.php(402): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Page), 'render', Array) #15 /multimedia/sites/dev-wire/wire/modules/Process/ProcessPageView.module(205): ProcessWire\Wire->__call('render', Array) #16 /multimedia/sites/dev-wire/wire/modules/Process/ProcessPageView.module(205): ProcessWire\Page->render() #17 [internal function]: ProcessWire\ProcessPageView->___execute(true) #18 /multimedia/sites/dev-wire/wire/core/Wire.php(376): call_user_func_array(Array, Array) #19 /multimedia/sites/dev-wire/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___execute', Array) #20 /multimedia/sites/dev-wire/wire/core/Wire.php(402): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessPageView), 'execute', Array) #21 /multimedia/sites/dev-wire/index.php(55): ProcessWire\Wire->__call('execute', Array) #22 /multimedia/sites/dev-wire/index.php(55): ProcessWire\ProcessPageView->execute(true) #23 {main} I'm currently running PW 3.0.50, but I'm unable to say what version it was when I previously installed. I have 2 menus, but removing one or the other give the same error. I call my menu by $options = array( 'wrapper_list_type' => 'ul',//ul, ol, nav, div, etc. 'menu_css_class' => 'topnav',//a CSS Class for the menu 'current_class' => 'active', ); $menu = $modules->get('MarkupMenuBuilder');//Load the module. $menu is an example echo $menu->render('main', $options); Do I doing something wrong?
  4. Hi @adrian For first time, I have a problem with this module, version 3.6.0. Fatal error: Call to undefined function wire() in /multimedia/sites/dev-wire/site/assets/cache/FileCompiler/site/modules/TracyDebugger/ProcesswireLogsPanel.inc on line 72 I tried de-install/re-install but without success.
  5. Some of my thoughts but I really don't know if it's feasible or too much error-prone. For sub-levels: Having a new field (in the CSV): sub-levels. I discovered this approach in the Menu Builder module. However, since this field doesn't exist in template, it could be confusing if we forget to add it when add or replace data. For multi-language: According to me, it shouldn't use | since they are already use for many images/pages. Furthermore, I used CSV in Excel to fill quickly in column format, so I need different CSV fields. I guess the best option is having for example: body_en;body_fr. But I'm not sure how to order the CSV since there is maybe non-multi-language fieldtypes in the template. And/or, since not applicable to CSV import-export, to add data, it could be a multilanguage area (it used when you edit a ML option's fieldtypes). But I have no idea how those things works, so I let you decide how good they are...
  6. Thanks! My lab's website. Not finish at all but I will show eventually.
  7. Hi I need to write NH<sub>4</sub><sup>+</sup> in my body field (using CKeditor). But, using source input, the marking is always stripped out and there is no button for sub and superscript. How I could achieve that? Thanks
  8. Perfect! Works as expecting when CSV is pasted. Thanks again!
  9. Version 1.4.9 You're right. Pasting CSV doesn't work but uploading file works.
  10. Again me... I have a problem I couldn't understand. I created my CSV file with " " in each column : "Article in Metabolic Brain Disease-Bosoi-2009";;"Accepted article";"Publication";2008-12-29 18:12:48;;"<p>Latest paper was published in Metab Brain Disease</p>";"<p>Latest paper was published online December 23<sup>rd</sup>.</p>";;;"Bosoi et al.-2009-MetabBrainDis" The last field is Page. Everything imports fine (no error), but last field is imported as Bosoi et al.-2009-MetabBrainDis" Why it keeps this extra " ? Thanks Melanie
  11. Seems perfect, will try those! Thanks
  12. Feel uncomfortable to ask something else, I already did so many times... But does it will be possible to mix actions "lister" and "edit"? I need to hidden some pages, but it will be so much easier if I could filter them and then selected all to hide. Thanks again so much...
  13. Thanks. I get it! The way @ottogal wrote, it didn't work. However, with your idea of array and a search on forum, I mix it with the Ryan's answer. So the final version is : foreach ($categ_team as $categ) { $content .= "<h2><a href='{$categ->url}'>{$categ->title}</a></h2>"; $cat_members = $pages->find("template=member, featured=0, categ_team=$categ, sort=-date_begin"); $years_start = []; foreach ($cat_members as $cm){ $years_start[$cm->date_begin] = $cm; } foreach ($years_start as $y){ $content .= "<h3>{$y->date_begin}</h3>"; //or apply some formatting to the $y value $members = $cat_members->find("date_begin=$y->date_begin"); foreach($members as $m) { $content .= "<h4><a href='{$m->url}'>{$m->title}</a></h4>"; } } } Thanks!
  14. Yeah, it keep repeating, 2, 3, 4 times depending of how many members have this date. Maybe it's not clear to me, but the result of $years is page id, not a year. So even if we add this ->unique(), I still get the same pageArray, already with unique values. Maybe it's my selector that is not good? I need to search for date_begin value of each member of a specific category and not just each page.
  15. Hello My list look like that. The names are in the good categories, but they are repeated. I tried foreach ($years->date_begin as $y) but it doesn't work also. Stagiaire (categ_team) 2014 (date_year) Fatma A (title) 2013 Juan B Jorge A 2013 Juan B Jorge A
  16. Unfortunately, it doesn't work. Even if I define $currentYear='' at the beginning, I obtained the same result. I guess it's normal, since in $years, I'm searching id pages and not the value inside the field date_begin of this page? Maybe it's the thing I don't understand.
  17. Hi I have a problem with a loop. I get repeated years. I understand, since I search for all member pages. But how I merged years (date_begin field, a number field)? Should be simple I guess, but I already spent hours on that... foreach ($categ_team as $categ) { $content .= "<h2><a href='{$categ->url}'>{$categ->title}</a></h2>"; //MSc, stagiaire $years = $page->find("template=member, featured=0, categ_team=$categ"); foreach ($years as $y){ $content .= "<h3>{$y->date_begin}</h3>";//les années $member = $page->find("template=member, featured=0, date_begin={$y->date_begin}, categ_team=$categ"); foreach($member as $m) { $content .= "<h4><a href='{$m->url}'>{$m->title}</a></h4>"; //nom de l'étudiant } } } Thanks Melanie
  18. Because author's page are created automatically with a CSV import. Since I didn't really want to manually check this checkbox on dozens of pages, I will prefer an other solution. I'm trying something else now, but it's not working yet, still have to think. ;-)
  19. Hi, I was thinking I solved my problem but I ran to an exception. My members are not unique, so I get some duplicates, but it shouldn't. Now the loop is written as for each author if found some member for each member add link if not, do as usual. But I need for each author if they are member add link if not do as usual. It sounds really strange, but I'm unable to do it even after spending hours (not kidding...). If someone could help... Thanks! Melanie
  20. OMG, again... I will be soon without words to express my gratitude! It works fine. I just get a really big red error, but it was my fault, a malformed path. After correction, all images imported correctly. Thanks again!
  21. @adrian : To me, only image will be sufficient. Anyway description would probably page's title, so it's not so necessary. @bernhard : I have no doubt... But unfortunately, as I spend 1hour just to find the good selector or the good loop, I can't imagine how I can write a script, mostly for a one-time import. Not sure it worth, adding images manually will probably take less time...
  22. A quick question. Before I try all ways around, is it possible to import file/image using BCE?
  23. Oh, why I don't know things so simple... Thanks!
  24. Hi Have a problem for searching pages. I have member template with 2 fields : title (example value : Mélanie Tremblay) and alias (example value : Mélanie A. Tremblay) I want to search for either those fields $publi = $pages->find("template=publication, categ_publi=$c, author~={$page->title}|{$page->alias}, sort=-year"); This selector works if both fields are filled. But if I only have title, I get an error: '~=' is not implemented in FieldtypePage. If I put only author={$page->title}|{$page->alias}, it found results only if alias field is empty. What syntax I should use? Thanks!
  25. OMG! It's just so wonderful! It works perfectly. Thanks so much!
×
×
  • Create New...