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

    Is it possible to set a default value for the summary(introtext) so that when we create a new resorce it already has the summary text(this is some css styles and html) in place?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      No, usually common HTML/CSS or other content is put in chunks.

      It would be even better to use a TV for this. You can set a default value for it when you create it, then if you want something a little different for any given page it’s easy to edit the TV for that resource.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 36404
        • 307 Posts
        hi,

        i would just add that, ressources having css and html in place on creating is more the templating job... not the summary one smiley

        if you simply created a template with your expected css and html, you would just have to choose this template when creating a new ressource and everything would be in place at once smiley

        have swing
          réfléchir avant d'agir
          • 7207
          • 14 Posts
          Thank you for assistance.

          The problem is there is some text at the top of the page that will be different for each page(20+ pages and growing), we are using different styles within this area and it needs to be edited.

          Is there a way of adding a [*content*2] so there is 2 editable regions within the main editor?

          Or can we hard code a default value for the Summary(intortext) using some php? $New_Modx_Summary_Custom = "some code that could be here";
          As it is only a text box after all..?

          Do you know what files control the editor?
            • 3749
            • 24,544 Posts

            Is there a way of adding a [*content*2] so there is 2 editable regions within the main editor?

            This is exactly what Template Variables are for -- creating extra fields.

            Once you’ve created the Template Variable, it will show up as an extra field when you edit a document using a template it’s attached to.

            You can display its content anywhere on the page using a tag:

            [*TvName*]

              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 7207
              • 14 Posts
              Hi

              Thanks for the help, that has really helped us out