Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

17 Good

About hollyvalero

  • Rank
    Full Member
  • Birthday 09/14/1962

Contact Methods

  • Website URL
  • Skype

Profile Information

  • Gender
  • Location

Recent Profile Visitors

1,319 profile views
  1. If it's not a matter of life or death, I sometimes just leave the page hidden instead of unpublished for a short while... hidden is viewable with the link but it shouldn't show up in the nav, etc.
  2. I’m looking for examples of how to use the page reference method. It seems like that’s the way to go. the page reference field is billcalendarbillref and it’s in the events records found. I need to match that field to the page title of legislation pages using the trackerplus template.
  3. I have 2 templates: Legislation and Events Legislation template fields: billnum (eg 1234) billtype (eg SD, LD, LR) title (An Act to Whatever) clients - a page reference field. We start with legislation of interest to a specific user who has tagged clients by role for that search string...and sort them by committee $user_roles_string = $user->roles->find('name!=guest')->implode('|', 'name'); $bills = $pages->find("template=trackerplus, limit=600, client=$user_roles_string, sort=billscmte"); And for each bill, we list clients which is simple since we prequalified them and that field is in this template: foreach ($bill->client as $c) { echo "{$c->title}"; } On the Events template, we have a single page reference field that references the piece of legislation above, with a custom format label that brings in {billtype} {billnum} {title} billcalendarbillref When outputting events, again, I use the user roles string to get the batch. $user_roles_string = $user->roles->find('name!=guest')->implode('|', 'name'); $events = $pages->find("template=trackercalendarevent, client=$user_roles_string, sort=$cbdate2, limit=600, cbdate2>=today"); For each event I want to create a similar loop to list the clients, but I need to look up the legislation to find a match first - using just the prequalified group of events. // if there is a bill reference in the event item if ($event->billcalendarbillref->id) { // locate the legislation page that matches the billcalendarbillref, get the clients listed, and print them out. $items = $pages->find("template=trackerplus, title=$event->billcalendarbillref->title, limit=1"); foreach ($items->client as $c) { echo "{$c->title}"; } } This doesn't seem right...Not sure how to word the match between [template:trackerplus, title] and [template:calendar, billcalendarbillref] ... I thought maybe I should be using $items = $page->references(); but then got hopelessly confused... It's printing blank instead of an error which is a nice change of pace. 😃 What am I doing wrong?
  4. That's exactly what I was looking for and it works beautifully!! Thank you so much! I haven't done much with multiple roles per user... this is terrific!!
  5. The set up: Lots of content shared by a variety of clients. To view data specific to one client, I've set up a role - Acme - and an associated template acme.php, so when the Acme user logins in, I can pop them directly to their Acme page where they only see Acme stuff. This works fine. That page loads various content pre-qualified by the client. I have the logins set to pop them to their page automatically. $bills = $pages->find("template=trackerplus, client=$page, limit=200, sort=title"); The challenge: I have internal users who manage several clients and want to see that same data but instead of visiting 3 pages, they want one page that lists all of the data for each of their clients only. I can add the roles: Acme, MegaCorp, for each internal user. I want to do the same kind of content display, but I need to sort the content If user jsmith is associated with the roles Acme, MegaCorp if user kjones is associated with the roles Brown, United jsmith logs in and sees the client data dump for acme and megacorp only. The field: Each content item has a multiple page reference field called client that I need to match to the roles of the user... and I need a list of names, not ids and trying various ways none of which are working... Assume I need to create a variable, and empty it out... then add the name for each one to the variable... $clientList = ''; foreach ($user->roles as $role) { add $role->name to $clientList; } $bills = $pages->find("template=trackerplus, client=$clientList, limit=400, sort=title"); Any assistance would be most welcome! 😓
  6. Hi! I'm experimenting with Ryan's RCDmap.js... got it all working but just wanted to use SVG images for the map markers. There's no class I can get... and #map .svg doesn't work. It seems like there should be a way in defining the icons to add something similar to iconSize: [30,30] or google's map options: size: new google.maps.Size(71, 71), origin: new google.maps.Point(0, 0), anchor: new google.maps.Point(17, 34), scaledSize: new google.maps.Size(25, 25) Not having much luck... and yes, I can do very tiny png images but they are tend to get blurry on higher res devices. Not sure whether I should just try leaflet maps instead. /* The path to the icons folder */ var path = '/site/templates/icons/'; var marker = new google.maps.Marker({ position: latLng, map: RCDMap.map, icon: path + cat + '.svg' });
  7. This is such a great addition to ProcessWire and SO useful, that I think it should be part of the core!!!
  8. * Yes! That's why I figured it wasn't available, but maybe could be...It's not a deal breaker because the pages would be filed under City -> Location (like the dog park) and the breadcrumb nav is most likely to be to back up to the city level... but to "see all dog parks" I'd need to find a way to dynamically link that page URL data source. On the city page I could... pages->find template=location (used by all) $page=city (locations are filed under cities) sort=title or sort by $ds->cat1 To link to a category since each is unique, maybe pages->find $ds->cat1=title but if it was a data source property echo $ds->cat1URL then you could avoid the find->step and it would be an elegant way to create a rich breadcrumb if using DS for page navigation elements. BTW -> I love this module. I had page reference fields originally and thought, good lord... what if there are 600 categories/subs/etc. It would be a nightmare to have to start at the top level each time. So this is really brilliant.
  9. I'm working on a project to grow my programming skills a bit by making a Yelp-style directory that could be used for any dataset of things like parks in the state of Maine. I've created 3 templates so the page tree is the source of the categories for a drilldown like: Outdoor Lifestyle (cat1) -> Parks (cat2) -> Dog Parks (cat3) Added dynamic selects and created a field called categorytree and set up the three so in the backend choosing top level, level 2 and level 3 categories is a dream. and having no problem displaying a basic breadcrumb... so when you get to the data dump for a location you get the breadcrumb: Outdoor life / Parks / Dog Park. $ds = $page->categorytree; echo "<ul class='uk-breadcrumb'> <li>$ds->cat1</li> <li>$ds->cat2</li> <li>$ds->cat3</li> </ul>"; Been going through the comments and I'm not sure this is possible, but wanted to make these live breadcrumbs...since all the data sources are pages... sort of like this, but obviously not this... Not sure in reading the previous entries whether this is possible? <li><a href='$ds->cat1->url '>$ds->cat1</a></li>
  10. I've got the maps working on the front end and back end... got a single map with all points, and individual location maps on their pages. API set, account hooked up, everything seems to be awesome. I just want to output the street address in addition to the map, so I popped in: <?php echo $page->marker->address; // outputs the address you entered But when I do I am getting the full address PLUS lat./long and a little [n/a]->address - and want the FORMATTED ADDRESS: 621 W Manchester Blvd, Inglewood, CA 90301 (33.961857, -118.367332, 12) [N/A]->addres ^ that's the formatted_address from Google maps... from the previous 25 pages of historic notes it seems that there's no easy way to extract this. Any $page->map->address, lat, lon - all returns the same feed, no doubt due to Google changes. Options currently seem: - long reverse engineering of the address and JSON parsing, - adding a second field and asking the data entry people to enter data twice... - using another script like Ryan's and coding via the API... Happy to have gotten this working aside from this for the sake of getting it to work, and the map with all markers is lovely...but considering Google's charging for clicks? The Google Maps Text Formatter may be the easiest way to accomplish this for sites with light mapping needs.
  11. I have a pro fields repeater field that I am using for page top alerts on a home page (thank you, COVID-19) ... this dedicated set of repeaters could have more than one type. --> repeater field is called cblock_alerts --> the first matrix type is alert I have limited the entry to 2 in the back end (assuming one live and one in reserve) but I only want ONE to show up so you don't get stacked alerts. Normally I repeat everything in my repeaters so the code looks like: if ($page->cblock_alerts) { foreach ($page->cblock_alerts as $item) { if ($item->type == 'alert') { echo " I've tried several find, get, limit, and they all either don't work, show nothing, or show both repeaters. I don't really need the foreach here, but there could be another matrix item so the item type == alert is needed. I'm looking for something like this: if ($page->cblock_alerts) { foreach ($page->cblock_alerts as $item) { if ($item->type == 'alert') { $firstalert = $item->first(); echo " or $firstalert = $item('limit = 1'); Lots of variations on these with no luck. Tried random... grrrr.
  12. That is - in fact - exactly what I do. I have a variety of pre-staged set ups for different purposes... I checked my set ups and they all had access for the trash to the editor... but this was a website I created about a year ago... it didn't include it, but now it does. 🙂
  13. Thank you, Robin... every time I figure one of these things out, I add it to my screensaver so all day I see messages like "don't forget to...{whatever}"... I will add this one now. 🙂
  • Create New...