processwire / processwire-requests

ProcessWire feature requests.
39 stars 0 forks source link

Add support for getting page template name in $pages->findRaw() #457

Closed Toutouwai closed 1 year ago

Toutouwai commented 1 year ago

Short description of the enhancement

It would be nice to be able to get the template name of pages in the array returned by $pages->findRaw(), maybe by using a syntax like template.name in the $fields argument.

Currently you can get the template ID by using templates_id in $fields but often the template name is preferred and that then requires the developer to do a separate step to translate the template IDs to names. It would be handy if findRaw() could take care of that.

ryancramerdesign commented 1 year ago

@Toutouwai Good idea, thanks. I have added this.

Toutouwai commented 1 year ago

Thanks @ryancramerdesign