Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taxonomy snippets: &outerTpl and &innerTpl placeholders conflict with getResources/pdoResources #37

Open
moniarde opened this issue Apr 5, 2017 · 0 comments

Comments

@moniarde
Copy link

moniarde commented Apr 5, 2017

Issue exists around using getPageTerms in getResources/pdoResources calls where &outerTpl and &innerTpl inline calls reference standard document placeholder names, ie [[+pagetitle]]. MODx parses the placeholder before processing the snippet call, leaving the placeholder containing the content of the placeholder before calling the snippet, rather than the placeholder itself.

Temporary fix for this is to use reference calls in SQL to create new placeholders for MODx to process, ie [[+terms_title]]. For instance:

$sql = "SELECT terms.term_id,doc.pagetitle, doc.pagetitle As term_title
FROM tax_page_terms terms
LEFT JOIN $content_table doc ON doc.id = terms.term_id
WHERE terms.page_id = {$page_id} {$and_where} ORDER BY terms.term_id ASC {$limit};";

Placeholders in the outerTpl/innerTpl calls can be adjusted to use [[+term.title]] in this case.

This issue exists for all relevant snippets, and requires resolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant