Jump to content

lele_ballack

Members
  • Content Count

    12
  • Joined

  • Last visited

Community Reputation

2 Neutral

About lele_ballack

  • Rank
    Jr. Member

Recent Profile Visitors

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

  1. Thank you so much @Robin S! Your solution works really well!
  2. Hi everyone, I'm trying to build an index with all the fields' name that belong to a template, excluding those fields that are empty. <?php $i=0; foreach ($page->fields->find('limit=3') as $field) { ++$i;?> <li> <a class="list-item" href="#par-0<?php echo $i;?>" title="<?=$field->name?>"><?=$field->name?></a> </li> <?php } ?> Are there ways to do it in the selector? Thank you 🙂
  3. Thank you so much @kongondo! The tutorial link was pretty clear and this solution works like a charm!
  4. Hi everyone, I'm trying to create an article index using all the heading titles of an article, but haven't succeeded so far. I tried with: foreach ($page->text->h2 as $heading) But I get this: "Notice: Trying to get property 'h2' of non-object" What's the best way to get all the h2 tags inside the textarea? I'm using CKEditor to write the articles. Thank you!
  5. Thanks @kongondo for your quick reply! That worked really well and the warnings disappeared! Just noted that there is small bug though after implementing the new code: the comments counter appears now in the dashboard (title and icons only, without any real counting) even though I chose a blog installation with no comments.
  6. Hi @kongondo I've just installed your module (version 2.4.5 in PW 3.0.148). Upon installing I did select blog style 1 or 2, and in both cases I keep getting this warnings above the dashboard: "Warning: Illegal offset type in ..\site\modules\MarkupBlog\ProcessBlog.module on line 916" "Warning: Illegal offset type in ..\site\modules\MarkupBlog\ProcessBlog.module on line 917" that refer to these two lines: $posts->title => array('published' => $qn['blog-post'], 'unpublished' => $qn['unpublished'] ), $comments->title => array('approved' => $numApproved, 'pending' => $numPending, 'spam' => $numSpam ), How can I remove those warnings? Is there a quick way to fix it? Thanks.
  7. I'm using FieldtypeFontIconPicker (2.0.1) to select icons to insert in my page in PW (3.0.148). It works really well and found it really easy to output icons in the web pages. I'm unable though to see icons while building a page which makes searching for an icon a lot harder. It seems that I can only see the icon class as shown in the picture. Is there anything I can do to be able to select the icon directly? Thanks a lot for your help 😀
  8. Thanks for your feedback @jacmaes, I understand your point. Looking at your link though, one of the possibilities to include Iubenda is 'Direct text embedding' which renders the Iubenda page as embedded in your own page layout. Upon further searches, I realised that the only thing that was amiss from the script I was given is the class 'iub-body-embed' which launches the script automatically when opening the page (instead of rendering a button that opens a modal as you correctly pointed out). In order to be able to launch the script through PW, I had to install the module 'Inputfield ACE Extended' which allows to 'write' Javascript directly into the page. It might be a bit of a overkill, yet I think it looks easier to read when it's embedded in a page of its own, inside the website layout.
  9. I was given this script to be embedded in the body of a page in order to automatically launch and render the destination link when the page is opened. <a href="https://www.iubenda.com/privacy-policy/*****" class="iubenda-white no-brand iubenda-embed" title="Privacy Policy ">Privacy Policy</a> <script type="text/javascript">(function (w,d) {var loader = function () {var s = d.createElement("script"), tag = d.getElementsByTagName("script")[0]; s.src="https://cdn.iubenda.com/iubenda.js"; tag.parentNode.insertBefore(s,tag);}; if(w.addEventListener) {w.addEventListener("load", loader, false);} else if(w.attachEvent){w.attachEvent("onload", loader);} else{w.onload = loader;}})(window, document); </script> How do I include it in PW? I tried using the CKEditor but it just outputs the script without launching it. If I include it in my template in PHP, it renders as a button that once clicked opens a new tab outside of my website instead of having the script being embedded inside my page. Do you have any suggestion about how to make this work?
  10. Thank you @LuisM! I think I'll remove the CKEditor where possible and play with CSS to render the rest of the elements in the same way. I'll definitely keep the reminder for the next projects! 😀
  11. Thank you @teppo! I think you nailed it! If I look into the page source, it happens exactly what you predicted as there is <p> inside my original <p>: <p class="wow fadeInUp animated" data-wow-delay="1.3s"><p>Some text</p></p> I could use your solution replacing the original <p> into a <div>, but I'm wondering if there is another solution as I'm doing a quick job and using a template which means I'd have to change most of CSS around the whole website in this case. Any other way of fixing this?
  12. There is something I can't figure out about about text fields and their position in the HTML code. There is a field which is a multi-language text area with CKEditor called "a_01_text". <p class="wow fadeInUp animated" data-wow-delay="1.3s"><?=$page->a_01_text?></p> After filling the field with "Some text" through PW, the result in HTML code is totally different than what I expected as my text is actually outside of the designated <p>: <p class="wow fadeInUp animated" data-wow-delay="1.3s" style="visibility: visible; animation-delay: 1.3s; animation-name: fadeInUp;"></p> <p>Some text</p> I was getting crazy trying to understand why my CSS rule wouldn't work on this text, until I realised this. It happens only with textareas, not with simple texts. Can anyone please explain why this happens and how I can fix this?
×
×
  • Create New...