Jump to content

Charlie W

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by Charlie W

  1. @psy: Thank you. I guess I could have been more concise and just asked if I can use php functions on fields in a selector statement. I thought there might be some built-in PW helper that I didn't know about. I shall restructure my code.
  2. This is probably a simple answer, but I've been chasing my tail for a few hours trying to find the right syntax. I'm trying to find the events that match the current month. The event_date field is of type Datetime and I want to select those that match a particular month ($currentMonth). I know I could select those with a date >= to the first day of a given month and <= the last day, but I'm trying to grab historical information over several years by month. My code: $events = $pages->find("template=event, event_date->format('m')=$currentMonth, sort=event_date"); event_date->format('m') is my failed attempt at selecting the month from a Datetime field The error: Unknown Selector operator: '[empty]' -- was your selector value properly escaped? field='event_date', value='->format('m')=01', selector: 'template=event, event_date->format('m')=01, sort=event_date' Any assistance is appreciated.
  3. Same issue here, but sadly my grace period for updates has expired, ☹️
  4. Jan: Thank you. That accomplished what was needed! SOLVED
  5. No. The proper way to link to a bookmark on ANOTHER page is "acme#siding", not "acme/#siding". The slash renders from Processwire, but my link is correct. Processwire is changing my link <a href="acme#siding">Siding Products</a> to acme/#siding when you view the URL at the top of the browser.
  6. I have a page that lists products for a lumber manufacturer; I'll call the manufacturer "Acme" for this example. Acme's products include both decking lumber and siding lumber. On the menu, when the user selects "siding", I need to load the page that lists the decking lumber and then the siding lumber and jump to the first siding product. Pretty straightforward...I have an <a id="siding">...</a> tag on the target page. The menu link target is "acme#siding", but when the URL gets rendered in Processwire, it changes it to "acme/#siding" (with the slash). I'm not sure how to get the result I am looking for. Any help is appreciated.
  7. Hello everyone! I am new to ProcessWire and I am working on a personnel websiite where jobs can be posted. I created a repeater called "jobs" which contains a series of sub-fields such as the job_title, job_status, job_location, etc. I then created a page and referenced the appropriate template for the jobs page. It works very well, but one thing I don't like is when editing the jobs page, the repeater fields show up as "Jobs #1", "Jobs #2", etc. (see image) I'm concerned that when the number of jobs grows, it will be a pain to maintain it because you will have to expand each of the job listings to find the one you wish to change. Is there a simple way to replace the "Jobs #1", etc labels with one of the sub-fields, such as "job_title"? That way I can easily edit the job I need. I know I can expand all items, but that is also not the best if the number of jobs grows. Thank you in advance and sorry if this question has already been posed. It was hard to describe exactly what I'm trying to do in a search for forum answers or documentation.
×
×
  • Create New...