Hi there, I just recently started using Modx and was wondering if there was a way to link documents within a chunk. I’m looking to have multiple editable sections on a single page, but want to keep things as simple as possible for end users. So I was hoping that it would be possible to insert some code into a chunk which would call the text from an un-published document and display it as opposed to using the [*content*] command.
Any ideas?
Hi,
Welcome to MODx! Hmm, I’m not sure I understand your question. However, chunks cannot contain logic...so no php in there. They can contain html, css, and such. You can however call a snippet from a chunk.
Multiple editable single sections can be accomplished using MODx template variables commonly known as TVs.
To get the best out of MODx you need to read up on chunks, TVs and snippets if you haven’t already done so.
Hope this helps
cheers/k
-
☆ A M B ☆
- 24,524 Posts
You can use a TV with @DOCUMENT binding. You could also use a chunk with a snippet to get the content of the desired document; I think there is one around somewhere called "GetField" or something like that.
Thanks a lot, that’s a big help. I’ll definately be looking at those tutorials once I’ve finished working through the current one