In Revolution, the Output Filter applies one or more of series of output modifiers, which behave similarly to PHx calls in MODX Evolution - except they're built into the core. If a raw placeholder, e.g.returns a string of text, you can modify it via a custom Output Filter, e.g.In the above example, the pagetitle value will be modified by a Snippet named When writing your own Output Modifier, your Snippet can take the following inputs:The syntax is that the Snippet name comes after a colon. In this document: Git basics and the first commit of a component on GithubWe assemble and install the first version of the package.We think over the logic of work, determine the schema and model of the databaseMIGX.Fancybox-images with seperate placeholders in Richtext-ContentUsing resource-specific mediasource and multifile-uploader with MIGXUsing resource-specific mediasource and multifile-uploader with MIGX (Old Version)MIGXdb.Create a basic gallery-management from scratch with MIGXdbAdd resource-specific mediasource and multifile-uploader to the galleryMIGXdb.Manage Child-Resources in a grid-TV with help of MIGXdbMIGXdb.Manage Events-Resources in a CMP with help of MIGXdb In general, any content in a placeholder that you think Sometimes, output modifiers can be used on a cached placeholder - but only if you're calling the Snippet that sets them cached as well. Check the page on MODX's built-in output filters "Input and Output Filters (Output Modifiers)") before writing your own filter. Luckily, MODX makes this ridiculously easy. For our example, the result will be the value of the pagetitle document variable appended with four exclamation marks.The original input value will be returned if the snippet returns an empty string.A good example of chaining would be to format a date string to another format, like so:Note that the user ID and username is already available by default in MODX, so you dont need to use the "userinfo" modifier:You will most likely want to call these uncached (see note about caching above) to prevent unexpected results. URL TV Output Type.
The syntax looks like this:You can also use these to modify Snippet output; note that the modifier comes after the Snippet name and before the question mark, e.g.The following table lists some of the existing modifiers and shows examples of their use. Based on code by gOmp. In MODX, the date output modifier, which is used to format dates using PHP's strftime () function, expects a unix timestamp. Defaults to the length of max. Although the examples below are placeholder tags, the output modifiers can be used with any MODX tag. Custom Output Filters are MODX Snippets dedicated to formatting placeholder output in the view layer (in a Template or in a Chunk). To use the output filter, you reference the snippet name.To documentation contributors: please add examples in alphabetical order.alternateClass simply checks if an integer (for example, a counting placeholder) passed can be divided by two. They allow you to modify values from inside your templates.In Revolution, the Output Filter applies one or more of series of output modifiers, which behave similarly to PHx calls in MODX Evolution - except they're built into the core. Creating a Custom Output Modifier. 50 characters. Example with a snippet named 'makeDownloadLink':The most important (and perhaps the most obvious) of these parameters is the As the examples to be found below are not included in the core, you will need to add these yourself. When writing your own Output Modifier, your Snippet can take the following inputs: $input; // the value that is being formatted/filtered $options; // optional values passed via backticks In order to turn a formatted date into a … The syntax looks like this: [[element:modifier=`value`]] They can also be chained (executed left to right): Contribute to DashMedia/MODX-hisrc-output-modifier development by creating an account on GitHub.