Hi Bob,
I'm struggling with the parentid param here as well. I would like to dynamically set the parentid based on a url param and am using the fastField extra to grab a value from the URL. Simple enough. I have the NewsPublisher snippet call in a chunk (so that the RTE doesn't bung things up). The chunk with the NewsPublisher call looks like this:
Case ID: [[!+caseId]]
[[!NewsPublisher?
&show=`StartDate,pagetitle`
&initdatepicker=`1`
&required=`StartDate,pagetitle`
&templateid=`4`
&parentid=`[[!+caseId]]`
&cssfile=`0`
&published=`1`]]
Where +caseId is passed as an argument of the chunk like so:
[[!$npNewCase? &caseId=`[[!#get.case]]`]]
The page outputs the case id at the top, e.g. ("Case ID: 34") but the new resource doesn't appear under the resource with ID 34.
Do I understand correctly from another post that NewsPublisher requires a static int value for parentid? Shouldn't the parser parse my [[!+caseId]] placeholder? Am I missing something?
This post states the same issue, but I don't understand the op's solution.
https://forums.modx.com/thread/85353/set-newspublisher-parentid-value-with-geturlparam
[ed. note: tonkatrucker last edited this post 11 years ago.]