We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10442
    • 3 Posts
    Hi all,
    I have a multilingual modx based website, and I wanted to include a news text that would be displayed on the top of my front page. I found an interesting code : http://www.editeurjavascript.com/edit/154.php (sorry for the french).
    My only problem is managing a manager interface that would allow to modifiy easily the news message without entering in the HTML.
    I am pretty bad in coding, and I do not know really how to create a plugin and a model variable that would for exemple add a form in every page I create with the manager where I can modify the text that will appear online.

    Is there someone that could help me?
    Thanks a lot
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      There are two ways you can deal with this.

      If the news item is only going to be displayed on the front page, use a chunk.
      {{NewsItem}}

      Then you can edit the chunk as needed. If you prefer, you can create a document with no template to hold your news item, and use a TV with @DOCUMENT binding to display the news item.
      [*NewsItem*]

      You could even just use the home page’s "Summary" (introtext) field to hold the news item.
      [*introtext*]


      On the other hand, if the news item is to be a brief summary of a regular news page (usually this would be the latest news page), which will also be displayed as part of a list of news summaries with links on a main "News" page, just use a Ditto call on the home page.
      [!Ditto? &parents=`xx` &display=`1` &tpl=`home_page_summary`!]
        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