We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6561
    • 139 Posts
    Hi,

    I have got a page with a field for ’main text’ content, but also two ’banners’ with text that I would like to separate, but still make it so that editors can change the text, preferably also with FckEditor. I thought of making them into chunks, but then they’d have to go into Modx Manager interface (and Html code) to change this.

    How is this commonly done?
      • 3707
      • 241 Posts
      Are the two banner fields specific to each document or do you want to include the same banner content on multiple documents?

      If they are specific to each document you could create a TV for each banner using the RichText input type.

      If you want to share the banner content across multiple documents you could create a new document for each banner, place the content for each banner in the default content field and use a TV with the @document binding to link the banner docs to whichever docs you want.
        • 6561
        • 139 Posts
        No I want to use them across multiple documents. So your second solution sounds best. So I see that it is possible to create a ’document’ that is really only a number of lines of Html code? And I can use a ’template’ to style that particular part of the code? I mean, is it possible to put something like:

        @DOCUMENT 130

        straight into the template code?


        Quote from: bob1000 at Mar 20, 2009, 07:49 AM

        Are the two banner fields specific to each document or do you want to include the same banner content on multiple documents?

        If they are specific to each document you could create a TV for each banner using the RichText input type.

        If you want to share the banner content across multiple documents you could create a new document for each banner, place the content for each banner in the default content field and use a TV with the @document binding to link the banner docs to whichever docs you want.
          • 7231
          • 4,205 Posts
          You need to create a TV and place @DOCUMENT 130 in the TV value field. Then place the TV in your document or template where you want the document content to show. You can do this with the GetField snippet as well (and the DynContent snippet) without using the TV with the @DOCUMENT binding.
            [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

            Something is happening here, but you don't know what it is.
            Do you, Mr. Jones? - [bob dylan]
            • 6561
            • 139 Posts
            Thank you.

            What input type (rich text?) and display type should I use for the TV?


            Quote from: dev_cw at Mar 20, 2009, 08:37 AM

            You need to create a TV and place @DOCUMENT 130 in the TV value field. Then place the TV in your document or template where you want the document content to show. You can do this with the GetField snippet as well (and the DynContent snippet) without using the TV with the @DOCUMENT binding.

              • 16183
              • 1,390 Posts
              Quote from: Darkelve at Mar 20, 2009, 08:40 AM

              Thank you.

              What input type (rich text?) and display type should I use for the TV?



              No, just text for input type. Rich text would be an overkill for this. By display type you mean Widget? I don’t think you need any.

              cheers/k
                • 6561
                • 139 Posts
                Took me a bit to get used to this, but now I got it!

                I noticed though: now it shows up in FckEditor/QuickEdit as an editable field (input field) with value @DOCUMENT 131 ... anyway to hide/camouflage this?

                Quote from: kongondo at Mar 20, 2009, 09:00 AM

                Quote from: Darkelve at Mar 20, 2009, 08:40 AM

                Thank you.

                What input type (rich text?) and display type should I use for the TV?



                No, just text for input type. Rich text would be an overkill for this. By display type you mean Widget? I don’t think you need any.

                cheers/k
                  • 3707
                  • 241 Posts
                  I use ManagerManager to hide these TVs but I don’t know if it hides them from QuickEdit as I don’t use it.