I searched for a topic similar to this one and found some things involving chunks in different folders and templates, but nothing specifically answering the question I have. I apologize if this has been answered before and I am wasting time and space.
Here is my problem: I am creating a web site that has four lines of text at the top that stay the same throughout the site, but the site uses three templates. I created template variables for each line of text at the top and assigned them to the three templates. I realized that the problem was that the owner of the web site now has to go into every page of the site where the input fields for those variables are if any of those lines ever change. For example: Let’s say the site has 10 pages that all use one template with those four lines of text variables. One of those lines of text has the company’s phone number. Now the content editor has to change the phone number and has to go into every page to put the new phone number into the variable field on each page.
Is there a way to make that top area with the four lines of text a chunk that is editable from one place and that shows up on all of the pages (templates)? This would be very simple if the content within the chunk wasn’t necessary to edit, but since I want to make it editable, I am trying to figure out a way. I messed around with bindings (@Document* and @Inherit*) but nothing seems to be working right. I have spent way too many hours trying to figure this out, so now I am coming to you for help.
(Also - I have disabled QuickEdit completely because the person that I am creating the site for doesn’t want to use that. My question only pertains to the login area of Modx.)
Thanks in advance!
*Disclaimer: I am a web designer that knows HTML and CSS, but I am very new to CMS and PHP, so please excuse my lack of knowledge or silly questions. ;o)
~Angela
Chunks would probably be the easiest method. You could also use @INHERIT or @DOCUMENT but I think for your situation a chunk would be the best choice.
Just create a new chunk with the your contact information in it and name it ContactInfo. Now in your template just put {{ContactInfo}} where you want the information.
The one downside to chunks is your client will see the pure HTML by default with the option to use a richtext editor and you may have other chunks you’d rather them not have access to edit. In that case you can use @INHERIT or @DOCUMENT. I won’t get into that now because the chunk may suite you fine but if you want to try one of the bindings just let me know.
Well if anyone knows how to get @INHERIT to work it should be me so let me know if you have any questions. It should work especially well if you have all of your documents underneath one homepage.
With @INHERIT just take one of your existing TVs and put @INHERIT as the deafault. Edit your homepage document and everything underneath it should be changed too.