-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By wesp
Hello everyone,
Is there a way to access the key number of an item in a page reference field and then output it as a value?
So for example I want to automatically output the number 1 if the referenced page is the first in the list and have it be updated when the list is reordered via drag and drop.
Thanks in advance!
-
By Roberts R
I have simple page structure:
category subcategory simple-product simple-product simple-product simple-product subcategory .... category2 so Im at category page and running
$pages->find("template=simple-product, has_parent=$page, limit=8"); and it returns 0 pages
but this returns 4 pages
$pages->find("template=simple-product, has_parent=$page"); Can someone explain why limit does not work here?
EDIT:
So I did some tests and it seems that any limit=n where n is >= actual page count that is possible ... selector return 0 results.
-
By jds43
Hello, I have a Page Reference by template radio button field to promote a certain page (only two options), but I'd like to target the page that isn't selected. This would be used dynamically throughout the site.
Does anyone know how I could accomplish this? Would I use something like remove() or not()?
-
By Manuel
Hi everybody!
I'm new to PW and just did the beginner-tutorial “Hello Worlds”, a beginning ProcessWire tutorial --> Link
After extending the template from the original tutorial with a page_reference-Field (Page-Field value type is configured as single page),
PW throws a fatal error when i try to output multiple pages:
$planets = $pages->find("template=planet, sort=-title"); foreach($planets as $planet) { echo $planet->title; echo $planet->planet_reference->title; } Should return three Pages, but throws the following error:
When i try to output the field with a single page, everything just works fine:
$planet = $pages->get(1018); echo $planet->title; echo $planet->planet_reference->title; I've tried to solve the problem with myself (and google), but i can't fix the error.
Thanks a lot!
My enviroment:
OSX Mojave / MAMP (PHP 7.2), PW v 3.0.123
-
By Hubris
Hi there!
I'm using some page reference fields to create lists of tags, categories, years, etc.. I'm able to find the pages like so:
$pages->find("template=project, {$filter}={$page->title}"); Which dynamically does something like:
$pages->find("template=project, tags=Experimental"); Only if the value (the page name, like "Experimental") starts with letters. If it starts with numbers, find returns nothing.
Why is this and how can I fix it?
-