-
MODX Staff
- 10,725 Posts
Using chunks. Chunks are areas of HTML that can be edited in one location and will update all locations that they appear. Just beware of any cached content that might contain the chunk; clearing the site cache will update those as well.
Thanks, OpenGeek!
So if I place (differently-named) chunks within each of these boxes on the template, the boxes can be edited on, say, the Clinics page, and they will then be updated to reflect those changes site-wide...am I getting this right?
-
MODX Staff
- 10,725 Posts
They would be edited under Resources --> Chunks tab, not on the pages, since they are not tied directly to pages.
The TV would call a single document that contains the content you want to appear in the sidebar. You then apply the TV to the template used by the pages you want the sidebar content to appear on. When you edit the document with the sidebar content, all the pages calling that document via the TV will be updated.
So, in your example with 5 boxes in the sidebar, you would create 5 documents and 5 TVs.
1. Create a new document and call it Sidecontent1 (or whatever is relevant). In the [*content*] area of that document, put the content you want to appear in that sidebar box. Note the ID of that document as you will use it in the TV.
2. Create a TV and call it Sidebox1. In the ’Default Value’ field, add @DOCUMENT 12 where 12 would be the ID of the document you created in step 1.
3. In the ’Template Access’ section, check the box next to the template or templates you want the TV to appear on and save. (Your page should look like the attached pic)
4. Call the TV by placing [*Sidebox1*] in your template code wherever you want the sidebar content to appear.
This will place the [*content*] section from Sidecontent1 into all the pages using the template you attached the TV to. You can then repeat the steps again for each of the boxes you want in your sidebar, obviously changing the names.
-
☆ A M B ☆
- 24,524 Posts
Unfortunately the document being bound still has to be edited from the Manager, all that will show from the QuickEdit will be the @DOCUMENT binding.
The way I got around something similar once was to have a snippet similar to the one that checks a user’s login status and displays a chunk if he’s logged in and belongs to the right group, and that chunk had a menu of the documents in question. So the editor user would get that menu and could go to the pages to edit them with QuickEdit.
http://www.modxcms.com/extMemberCheck-1320.html
I see how that could be a problem. Personally, I don’t care too much for front-end editing. I prefer my clients to use the manager with a limited role, having access to edit documents but not resources.
So the question for you Wendy is, do you want your clients to use QuickEdit or the Manager to edit the content? Of course you may want to use both.
The person who is going to do most of the updating is designated as an Admin and she’ll use the Manager. I just don’t think she’s interested (or knowledgable) in messing with html, but I guess if it has to be, we’ll have to deal with it...?