Alex CA

Members
  • Content count

    9
  • Joined

  • Last visited

Community Reputation

2 Neutral

About Alex CA

  • Rank
    Newbie
  1. I was able to make it work. There was a type in the previous code which caused the issue.
  2. I am currently designing a search page for my website. While I am able to get both pagination and fieldtype caching enabled separately, I am not able to implement them together. I followed the following 2 pages - https://processwire.com/api/modules/markup-pager-nav/ https://processwire-recipes.com/recipes/set-up-search-index-with-fieldtypecache/ Is there any way where I can combine these 2 methods for my website? Here is a snippet of my code $q = $sanitizer->text($input->get->q); $q = $sanitizer->selectorValue($q); // Search the cacged fields for our query text. // Limit the results to 50 pages. $selector = "search_cache~=$q, limit=50"; // If user has access to admin pages, lets exclude them from the search results. if($user->isLoggedin()) $selector .= ", has_parent!=2"; // Find pages that match the selector $matches = $pages->find($selector); //Get range of paginated results $start = $matches->getStart() + 1; $end = $matches->getStart() + count($matches); $total = $matches->getTotal(); $content = "<p><b>Showing search results ". $start . " - ". $end . " of ".$total."</b></p>"; // did we find any matches? if($matches->count) { $content .= '<ul>'; foreach($matches as $match){ $content .= '<li>'. $match->parent->title . ': <a href="' . $match->url . '">' . $match->title . '</a></li>'; } $content .= '</ul>'; $content .= $matches->renderPager(array( 'listMarkup' => "<ul class='pagination'>{out}</ul>", 'nextItemLabel' => "Next", 'previousItemLabel' => "Previous", )); } else { // we didn't find any $content = "<strong>Sorry, no results were found.</<strong>"; }
  3. Hi, I am just getting started with a project which has been previously built using Processwire2.7. I was wondering if there was anyway to modify the admin screen when entering data for a template. For example, I have created a student template with fields : Name, Major,Insitution, is Graduate?(checkbox) and a hidden field : ' Graduate level' Now, whenever I check the 'is Graduate? ' checkbox on the admin panel when entering the data, I want to show the 'Graduate level' field. Since, this is a change on the view for the admin page, I am not quit sure if there is some way to achieve this. Does anybody know how I could achieve this? Thanks!
  4. Alright I found the error. I had to install the module after adding it
  5. I was just looking at this module Profields It states that except Repeater Matrix ProField ,everything works with Processwire 2.6+. I am currently using Processwire 2.7.2 and I primarily wan to make use of Table and Autolinks. Has anyone using Processwire2.7 faced any issue with this module? I am relatively new to Processwire and I do not want to end up buying a module which could have compatibility issues. Thanks
  6. Thanks! I have currently implemented it using jQuery and use the API and was wondering if there was a module
  7. I am fairly new to Processwire and using APIs and I wanted to implement a certain functionality for one of my templates. Suppose I want all pages that use template A to display wiki content associated with page->title in page->body . For example if page->title is "Google", I want the body to consist of the data present on https://en.wikipedia.org/wiki/Google I understand that one way of doing this is using APIs from Wikipedia (but I do not have good experience in working with APIs) Could someone guide me though the process or point me to an already available module for this functionality in Processwire?
  8. Thanks a lot! This worked for me
  9. I am a newbie to Processwire and have been given a task to add some features to a website that has been already been developed. One of the fields (say Filed A), is of type Page. There are 100+pages in field A. A template Temp B uses this Field A and just displays the name of the pages of type Filed A selected for the page which uses the template B. Now, since there are many pages in Field A, it is displayed as a list and its gets difficult to scroll through the entire list in the admin page to find and add a particular entry from Field A. Could someone guide me if I could have a dynamic search bar for this field A which would work similar to how the search works on the processwire admin page? I want this search bar to be displayed right above the list of FieldA which will then dynamically improve the results as I type in the search box