Jump to content


  • Content Count

  • Joined

  • Last visited

Posts posted by quickjeff

  1. Robin, awesome thank you! 


    Here is the thing, I can certainly get the position on the actual page that contains the foreach loop and selector but I also have an account page for the restaurant owner to see data on his restaurant such as what cities he is appearing under. However this page I would like to show the position his restaurant is displayed at. Right now, the only way to do this is to write the foreach loop again inside of the account page. I think the way I have it now is a poor way of doing it, Ideally I would like to somehow find a nice way to display the position the restaurant listing appears in. Any other input is appreciated. Thank you!

  2. Hey Robin, 


    Popularity score I am using is based on star rating, using the comments field for this one and requiring stars. 

    Then when I use a selector and then foreach loop I am sorting by average number of stars.

    However I want to be able to show the restaurant owner the ranking of their restaurant per city. Thats the issue. The position is not being stored anywhere, it's happening on the fly with the loop. If I decided to store it on page load, then I would have to rely on the page being loaded for an update as new restaurants are added. 


  3. Hi Guys! 

    I have a bit of a puzzle for you. I have been mapping this one out in my brain and on paper all week. I haven't come up with the right solution yet. 

    Here is the project. I am working on a directory site similar to http://demo.processwire.com/ but for another subject.

    Let's say I am building the skyscraper site but let's say I am doing this for restaurants in cities.

    I am building a parent page called cities and then a parent page called restaurants. 

    Goal is to display the restaurants according to popularity.
    Therefore, if I am storing the pages under their appropriate parent. Restaurants are under restaurants and cities are under cities.  

    Visual  Page Tree:


    • New York
    • Chicago
    • New Orleans


    • Big Toms Burgers
    • McDonalds
    • Dominos


    Now a restaurant may have 10 locations therefore, I am using a foreach loop inside of the city page to call all restaurants that pertain to this city and sorting by popularity. 🙂 

    Here is the kicker, how the heck do I document the position the restaurant appears in under the city? Do I save a value in the database? 
    I know I can use a counter to count the loops and assign a value then save that value to the database to the pertaining Restaurant but this relies on page loads and imagine 1000 restaurants all updating at the same time on the database on page load. WOW! No go. 

    How the heck do I save this value without ever having to load a page? ALL IDEAS WELCOME PLEASE! 🙂 


  4. Hi Guys,

    I am running a page template that contains a filter form that allows users to display results based on number of  comments. 

    Here is what I am thinking about doing: 

    -add new field called total_comments 

    -somehow populate this field every time a new comment is added or removed by admin with count($page->comments)

    -use form filter to display results that the selector form has found.

    Example: $selector = “total_comments>=$q”; 


    My question to everyone: Is this a good approach? If so how do I get another field to update based on the comment module adding or removing a comment? 

  5. 1 hour ago, Zeka said:


    This is awesome and I starting building off of this but now, I can only overwrite todays date. If I am tracking lets say 30 days, I think it would require 30 fields unless I create some kind of repeater field but in my mind, that doesn't sound like the right way. 😞 

  6. Hi Guys, I have seen some other threads that talk about this but nothing recent nor in line with what I need. 


    I have basically created a page in which I am tracking the number of views. I update the counter which is tied to a field I added to the page's template that I am tracking. The field is hidden from the website admin and only used for this data. 


    However, now I need to track it on a daily basis. I am thinking of keeping track of all time view total for 30 days and perhaps saving that and allowing the user to see the page views of last 7 days, each day as a number and then 30 days of data. This way if I want to build in reporting functionality I can. 


    What I need help with adding a date to the page_views field but also, knowing how many page_views for today, yesterday, day before etc. 

    Here is what I have so far and its working. Now I need to associate a date with every day. NOT every update of the page_views field. 

    if (!$user->hasRole('superuser')) {
    		    $page->page_views += 1;
    			echo $page->page_views;

    Any guidance, help, suggestions is absolutely appreciated. 


  7. Hi Guys,

    Right now, I am using parents as breadcrumbs but I have pages under a parent page just to keep things organized. The pages are called in other areas of the site. 

    I am trying to create user path history breadcrumbs.

    Meaning: If the user clicked a link to the page, it will show the path he took. Has anyone done this? Would love to see who has before I dive in.


  8. On 8/25/2018 at 3:26 AM, matjazp said:

    What PW version? There have been some updates to PageFrontEdit a few months ago. It also looks like jQuery is not loaded before other scripts. PageFrontEdit doesn't play well with Jquery 3 used on the frontend. See https://github.com/processwire/processwire-issues/issues/609 and https://github.com/processwire/processwire-issues/issues/574

    Using latest version of PW and loading the bootstrap 4 scripts in top and bottom. I tested both ways and it doesnt work. I think its the .slim.min.js file thats breaking things. However this is needed for the toggle drop down and other menu/navigation drop downs in Bootstrap. 

  9. Hi Guys, 

    I am currently testing the Login/Registration Front End Module. 


    I see it only supports standard fields and not image fields. 

    I wanted to give the ability to a user to add a profile pic and one more image field that will most likely be used for a background image. 

    I have built something like this strictly using the API and PHP inside of templates.

    Any light on accomplishing this by modifying the module?


    • Like 1

  10. 1 hour ago, Ivan Gretsky said:

    Hey, @quickjeff! There is already a discussion going on here. Maybe you will find something useful. But as I see it, not really much to be done on PW side, but rather on developer side.

    Thahnks Ivan! I am just trying to find the best plugin for the cookies. 

  11. Hi Guys, 

    I wanted to start this thread to see what others are doing to make sure they are compliant with GDPR.

    Basically, a ton of websites are built on WordPress and I am seeing tons of plugins being rolled out to help with cookie compliance etc. 

    Processwire however, doesn't have anything available. Also, if we are using FormBuilder, do we need an opt-in checkbox?

  12. Does anyone know best approach to including the featured image in the post itself? Let’s say below the rendered head of the post? I already have it setup as an option in the blog home page but not the post. 


  • Create New...