Jump to content

Jonathan Lahijani

Members
  • Posts

    523
  • Joined

  • Last visited

  • Days Won

    17

Posts posted by Jonathan Lahijani

  1. @NoremPload ProcessWire 3.0.142 (which is a dev version and very recently released) brings in the ability to have custom fields for images.  I personally had some issues with this ImageExtra plugin and stopped using it a while ago (it's been a few years).  Also the author is no longer working with ProcessWire so there's also that.  I'd recommend putting in the extra work to do it the new, native way:

    https://processwire.com/blog/posts/pw-3.0.142/

    • Like 1
  2. On 8/18/2015 at 12:18 PM, Jeroen Diderik said:

    I had an issue with a PageField too, although not with 2 PageFields on the same page, I ran into a limit.

    In short: if you have more then 170 (in my case reproducable) referenced pages in the field, AND the 'AutoJoin' is set, then when selecting more then 170 items (using for example SelectMultiple), after saving the page, the API will only return the first 170 items...and thus only 170 will be selected if you re-open the page in the backend.

    Here's my post on it in the forum

    Related: https://github.com/processwire/processwire-issues/issues/928

  3. I have a Page field and in ProcessWire, I can get values from it like this:

    $page->my_page_field; // returns the ID
    $page->my_page_field->title; // return the title

    Given my particular situation, I'm hitting an infinite loop as I documented here a few years ago:
    https://github.com/ryancramerdesign/ProcessWire/issues/1962

    Is there a way to ONLY get the raw ID of the assigned page without ProcessWire getting all the attributes of that page leading to the loop?

  4. I'm looking to improve my editor (VSCode) in a way whereby it will tell me the value of a ProcessWire setting() value that's been defined in another file as I write an override setting.

    Let's say I have a file called /site/templates/settings-default.php with the following:

    setting("my-div", "my-default-class");

    And I have another file called /site/templates/settings-override.php with the following:

    setting("my-div", "my-override-class");

    As I'm writing that specific line in "settings-override.php", is it possible through some sort of auto-suggest / intellisense for it to tell me the value of the setting in "settings-default.php" so that it provides context in realtime as I write the override setting?  This would prevent me from having to switch between the two files in my editor and improve my workflow.

    Any suggestions would be appreciated.

  5. I have PageFrontEdit enabled.  I have a template that includes a bunch of partials.  Those partials contain the PageFrontEdit tags in the following format:

    <edit field="body" page="<?php echo $page->id; ?>">...</edit>

    This is all working well, however I have a particular template whereby I don't want Frontend Page Editing to be activated at all, as if you were logged out.

    https://processwire.com/docs/front-end/front-end-editing/

    What's the best way to disable it for a particular template? Is there a proper hook for this perhaps?  Or some hackish JS approach?

×
×
  • Create New...