Jump to content

jarek

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by jarek

  1. There is an Artists page (regular PW page). On this page there are multiple artists and each artist has multiple works. Each work has an inventory number property that sometimes may not be unique. Works also have images, titles etc. So it looks like this: Artists (page) -> Artist (repeater) -> Work (repeater) -> inventory (string) I don't see any other approach that would be easy to maintain and edit on admin page. @MindFull , your code counts other repeater (Biography) that is another child of Artist repeater.
  2. Right, I am trying this: echo ($pages->count("Artist.Artist_works.Artist_works_inventory_no=1, Artist.Artist_firstname=" . $firstname . ", Artist.Artist_lastname=" . $lastname)); echo ($pages->count("Artist.Artist_works.Artist_works_inventory_no=1")); and both return 1. Unfortunately when I set Artist_works_inventory_no=1 on more than one Artist_works (of the same Artist), it still counts only 1. I do not get it at all
  3. Why does count matches 3 pages if only one item has attribute Artist_works_inventory_no='1'? I get the same count number no matter what selector I use: echo ($pages->get(1021)->Artist->get("Artist_firstname=" . $firstname . ", Artist_lastname=" . $lastname)->Artist_works->count("wrong_name=122")); // also returns 3
  4. Hello! I am new here. As far as I understand from the documentation, $pages->find("selector") and $pages->count("selector") should work in a similar way. Why does count() in the following code counts 3 items, while find() returns only one? echo ($pages->get(1021)->Artist->get("Artist_firstname=" . $firstname . ", Artist_lastname=" . $lastname)->Artist_works->count("Artist_works_inventory_no='1'")); //returns 3 echo ($pages->get(1021)->Artist->get("Artist_firstname=" . $firstname . ", Artist_lastname=" . $lastname)->Artist_works->find("Artist_works_inventory_no='1'")); //returns 1069 that is ID of the correct item On the page 1021 there is Artist repeater field and each has Artist_works repeater inside. For the artist with my firstname and lastname there are 3 works in total but only one has attribute Artist_works_inventory_no = 1.
×
×
  • Create New...