CamperManagement.Placeholders you can use
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
$407 per month—let's make that $500!Learn more
Both the cmCampers and cmCamperDetail snippets work with the same data and allow you to include/exclude certain objects with properties. This page will give you an overview of the different placeholders you can use. In some chunks (eg tplImageItem) you should be able to use any of the parent chunks as well, for example camper details.
When using cmCampers, you should use the placeholders in your chunks CACHED to prevent weird behaviour. Example:
[[+brand]] When using cmCamperDetails, you should use the placeholders prefixed with cm. (don't forget the dot), and make sure you are calling them UNCACHED. Example:
Snippet specific: cmCamper¶
These are specific placeholders for the cmCamper snippet. Besides these, look at the object placeholders mentioned further down below to see what you can use from each object retrieved.
|url||The href part of the link to the resource identified with the &target property. Will contain an url parameter "cid" with the camper ID as value.|
|owner||Depends on your includeOwner property. When 1 it will output the result of the tplOwner property chunk, if not it will return the owner ID.|
|images||Depending on the includeImages and numImages (>0) property this will be filled with the contents of the tplImageOuter property chunk, which in turn was filled with the contents of the tplImageItem property chunk for each image item.|
|options||Depending on the includeOptions property, this will return your options as formatted by the tplOptionsOuter and within that the tplOptionsItem chunks.|
tpl*Outer Chunks (as well as placeholders set by cmCamperDetails!)¶
|tplOuter||items||Contents of all tplItem chunks, separated by a linebreak. (\n)|
|tplImageOuter||images||Contents of all tplImageItem chunks, separated by a linebreak (\n).|
|tplOptionsOuter||options||Contetns of all tplOptionsItem chunks, separated by the separater specified in the &optionsSeparator property of the cmCamper snippet.|
Campers (Class: cmCamper)¶
|brand||When not including the brand object (&includeBrand=
|manufactured||Will be formatted d/m/Y using strftime.|
|periodiccheck||Will be formatted d/m/Y using strftime.|
|remarks||Stored plain, so no HTML tags. If using line ends in the remarks textarea, you may want to apply the nl2br output modifier.|
|price||Formatted using money_format (is included if not present on your machine) using options: %!.2n|
|status||Status ID (0-5 inclusive), representing:|
|4. Conditionally sold|
|statusname||The translated string related to your status ID.|
|owner||Owner object relational ID, not further information.|
|id||Camper object unique ID|
|added||d/m/Y formatted timestamp the object was added.|
|archived||d/m/Y formatted timestamp the object was archived.|
Options (Class: cmOption, many-to-many class: cmCamperOptions)¶
Brand (Class: cmBrand)¶
Typically not accessed directly, but replaces the camper brand placeholder with the brand name from this object.
Owner (Class: cmOwner)¶
The owner object could be used as a very rudimentary customer relationships system. Unless you have build some kind of classifieds system, you will probably NOT show any of this info to the site visitor anywhere.
|Suggest not to use this in a publicly accessible place.|
|bank||Suggest not to use this in a publicly accessible place.|
|phone1||Suggest not to use this in a publicly accessible place.|
|phone2||Suggest not to use this in a publicly accessible place.|
|address||Suggest not to use this in a publicly accessible place.|
|postal||Suggest not to use this in a publicly accessible place.|
|city||Suggest not to use this in a publicly accessible place.|
|country||Suggest not to use this in a publicly accessible place.|
Images (Class: cmImages)¶
|camper||Camper ID reference|
|image||Relative URL, can be used with phpthumbof to resize.|