Blog Sections Open

Why getResources Can Keep Outputting Fields from the Current Page Instead of the Requested Resource

If getResources keeps returning the current page fields, the template is probably using direct resource tags instead of row placeholders.

A very common getResources mistake is to use tags like or inside the row template. Those tags point to the current page, not to the resource currently being iterated.

The important distinction

Inside getResources output, you need row placeholders such as and . Otherwise the snippet keeps rendering fields from the page that called it.

This issue looks like a data bug, but it is really a templating-context bug. Once the output uses row placeholders consistently, the requested resource fields appear as expected.

Newer post

Implementing Quantity-Based Discounts Per Product in Shopkeeper

How to model product-specific quantity discounts when each item should change price based on how many units of that same product are in the cart.

Older post

Why a PHx Condition Can Fail Even When the Placeholder Value Looks Correct

How to debug PHx conditional output when a placeholder visibly contains the expected value but the branch still does not match.