We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30711
    • 70 Posts
    I want to have a text field on one page where anyone can write anything they want and then save it. Latest save will overwrite the previous one. I also want to display this text on other page. I would guess it has to be a template variable? And I could call it with Ditto, but I have absolutely no clue where to start with the text field (or even TinyMCE field?) and how to save that when use presses the save button.

    Cheers,
    Tommy
      • 19369
      • 1,098 Posts
      Exactly, you need a Template Variable.

      1) Go to Elements > Manage Elements > Template Variables > New Template Variable

      2) Add these parameters:
      Template Variable Name: customContent
      Caption: Enter the content here
      Input Type: text (Note: if you choose RichText you can edit the content with TinyMCE)
      Default Value: @INHERIT
      Template Access: Choose the template where you want to show the content

      3) Add [*customContent*] on your template or in a Chunk. If it doesn’t work try with [+customContent+].

      Be aware that @INHERIT will work only if you input the content from a parent page:
      "@INHERIT - inherits the value of the same TV as set for a parent document."

      There is also another way, if the first doesn’t work. Try to follow this tutorial http://wiki.modxcms.com/index.php/Use_a_Document_to_form_sidebar_content