Search the Community
Showing results for tags 'widget'.
-
Hello guys. I am super happy to be passing to the final cleanup of my first custom build theme and to start applying the SEO optimization modules/code. I noticed something strange this morning and can't find out where exactly is my issue. Hopefully it is a quick fix or silly miss on my side. So here is the issue: I am generating a list of all my recipes in the db using the following query: <?php if($page->numChildren) { //Build a selector and limit page results to 10 $recipe_results = $page->children("limit=4"); //Assign results of the array to $listing foreach($recipe_results as $index => $listing) { //Limit the text content to 160 chars using the function in function.php $text = $sanitizer->textarea(truncate("$listing->recipe_intro_text", 160)); ?> Then follows the boring part of html insert of the variables, clases etc. The listing works fine. So as far as there would be more than the planned results per page, I implemented the page rendering using the following code: <!-- Pagination --> <?php echo $recipe_results->renderPager(array( //Show font awesome right hand icon for next page 'nextItemLabel' => __("<i class='fa fa-hand-o-right'></i>"), //Show font awesome left hand icon for previous page 'previousItemLabel' => __("<i class='fa fa-hand-o-left'></i>"), //Define the active class of current page 'currentItemClass' => "current", //Define the block markup code 'listMarkup' => "<ul class='page-nav'>{out}</ul>", //Define the item markup code and applying currentItemClass 'itemMarkup' => "<li class='{class}'>{out}</li>", //Generating the link appearance of all buttons 'linkMarkup' => "<a href='{url}'>{out}</a>", )); ?> <!-- Pagination --> And again, everything worked perfectly after I allowed page numbers. So then I implemented a few similar queries in the sidebar of my website, listing content from other page parents/children. Here is one example: <?php $favorite_books = $pages->find("template=books-inner, sort=-random, limit=3"); foreach($favorite_books as $b) { if (count($b->book_images)) { $thumb = $b->book_images->first->size(70,60)->url; $desc = $b->book_images->first->description; } else { $thumb = $settings->small_thumb->url; $desc = "NoThumb"; } ?> <li> <div class="thumb"> <a href="<?php echo $b->url?>"> <img src="<?php echo $thumb?>" alt="<?php echo $desc?>"/> </a> </div> <div class="detail"> <a href="<?php echo $b->url?>"><?php echo $b->title?></a> </div> </li> <?php } ?> It was all working fine, until I started browsing page 2, 3, etc. It appears for some reason, that the pageRendering is applied not only to $recipe_results, but also to all requests from the widgets. So on page 1, I get the proper number of recipes and proper number of results in the widgets (books in this example). If I browse to page two, I still see the proper recipes number and everything else, but the widgets show only 1 result (as far as I have imported 4 test posts only). On page 3, it shows notihing in the widgets, but recipes are OK again. As far as to render pages I am using $recipe_results and the pageRender is called for that variable, I am not sure why it is also applied to $favorite_books and other widgets. Any suggestions or ideas what is going on? I tried to change every variable on the page thinking that I might be having a call to the same one, but it is obvious in the example that they do not match...
-
Hello I'm trying to creat a widget and add it to ckeditor. I found this tutorial, but something I make wrong. First I downloaded this plugin (https://ckeditor.com/cke4/addon/widget). I extracted the downloaded plugin in site\modules\InputfieldCKEditor\plugins. Then I started with the simplebox tutorial. I added a new folder ("simplebox") in site\modules\InputfieldCKEditor\plugins and followed the steps in the tutorial. But I'm struggeling with the part "CKEditor Initialization". I selected "simplebox" and "widget" in the 'extra plugins' section of the field config, but there are no extra toolbar buttons. If I open the page with the textarea there is only a empty field (s. picture). Could you help me?
-
I am making a website where on multiple pages i would like to have swappable customisable 'widget's or cms editable areas. Can anyone suggest how to implement a good visual way of doing this? (eg. Like the repeater field but each entry is an inline editable widget)
-
While the implementation here is specific to InGo product functionality, we thought we'd share it here generally as well because the approach and use of templates, fields and other aspects of the implementation might be useful to others trying to incorporate third-party widgets into your pages. Enjoy! Integrating InGo Into a ProcessWire Site
-
- integration
- template
-
(and 1 more)
Tagged with:
-
Hello, I'm new from PW. I had seen it a few months ago, I had watched Ryan's video and... few months had passed ! So recently, I searched hours and hours on the web a better solution for my blog than Wordpress. I had tried many CMS and suddenly I remembered : ProcessWire So, I installed it few days ago with the fabulous Blog Profile module (thanks Ryan). And now I want to add widget in my sidebar. I have searched on forum, in videos or tutorial, but I think I don't have made a good search. I try myself but it doesn't work So if someone would help me or send me some greats links, I think it will be top Thanks a lot everyone and to finish I'm proud to join your community ! Elkolonel.