Hi,
I am new in modx.
I want to know what is placeholders [+ +]. I also read about placeholders from modx documentation but could not understand it.
Can anyone help me?
Thanks
how do we know summary is a placeholder. is there any predefined syntax to define it and is this in same page or other page?
This summary is a snippet or chunk. If it is a snippets then how we make it and know it is a placeholder.
The beauty of ModX is it’s configurability. You can create your own custom snippets, define your own custom syntax for your own placeholders. First read through all the documentation, then as you’re working in ModX maybe your questions can become more specific - targeted to a specific problem you’re having. The only way to learn ModX is to be patient and just dive in and start working with it.
The easiest way to get into MODx is to do as cbaone wrote, it’s all in the documentation.
Go through it step by step, install MODx with exampledata, and compare the examples in the documentation with the exampledata in your MODx-installation, and you should be able to find many answers. It’s always better to do some selfstuddy to get to know things. Good luck, and be welcome to ask more questions when you need to.
I think, thererfor I am! But what I am, and why...?
Quote from: veeneet at Jun 03, 2008, 12:25 AM
how do we know summary is a placeholder. is there any predefined syntax to define it and is this in same page or other page?
This summary is a snippet or chunk. If it is a snippets then how we make it and know it is a placeholder.
A placeholder is usually set by snippets. Every snippet usually has documentation that lists the placeholders it creates. Why placeholders? In Joomla, if you install a module, then you are either stuck with it’s output or have to hack the actual module code.
With MODx, the advised role of php is to return it’s output at placeholders so you can place them wherever you want on the page. Think of placeholders as chunks created by snippets.
[+summary+] is a Ditto placeholder. It works within Ditto templates. The document has a place to add a summary which is the "intro text" field and is called by using the [*introtext*] placeholder.
From within snippet templates use the [+ +] syntax but when using them directly in the document content use the native [* *] syntax. Since ’summary’ is to be used within a Ditto template then it can only be used as [+ +].
Here is a link with the default document variables (placeholders) that can be used within each document. Then you need to understand the placeholders that are available within the snippets that you are using. THis can normally be done by reading the individual snippet’s documentation.