We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8619
    • 229 Posts
    So this template that I can create is being called with the newsmanager snippet and I use it’s placeholders then too, correct?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      There’s several different templates that we are talking about here. You seem to be confusing them.

      There are templates for the NewsEditor/NewsManager forms for editing/creating/managing the news article on the editing and managing pages. There are templates for specific parts of the new document being created.

      There are templates for Ditto for displaying the news summary blocks on your news summary listing page.

      Then there is the main MODx template (in the Manager, these are in Resources->Templates) for the HTML of the actual page to be sent to the browser. When looking at the individual news item’s page, how it looks is totally dependent on the main MODx template being used by that page. Go look at the new document in the Manager, and you’ll see which template it’s using. Any adjustments to that template are done in the CSS file that template uses. (assets/templates/templatename/whatever.css)
        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
        • 8619
        • 229 Posts
        Now we’re getting closer!

        I am looking for how to automatically style the new post that comes from NewsManager. When one of my editors creates a new post, I don’t want them to have to worry about the main admin functions. I want the new post, which is created under a container page, to automatically be styled in the way that I want. I have the Ditto template figured out, and am happy with the NewsManager for now and know how to style it, but how do I accomplish this so that the new post automatically gets the template for the actual post page by default?

        Thanks a ton for now!
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          The new post gets your main site template. Nobody has to do anything; you just need to adjust your main site’s template’s CSS so the news page looks the way you want.

          If you want the news pages to have a different template, create the new template in the Manager, fix the CSS for it to the way you want it, then use the &template=`MyNewTemplate` option in the NewsManger and NewsEditor snippets.

          Keep in mind that the user is creating a new document, just as if they were logged in to the Manager and creating a document there. Fewer options, is all.
            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
            • 8619
            • 229 Posts
            Ok, here is where I stand:

            I created a new template and have called it in both the NewsManager and NewsEditor snippets:

            [!NewsManager? &folder=`31` &editformid=`34` &template=`global_newsitems`!]
            <a href="[~34~]">Create new post.</a>

            This new template is a duplicate of the main site template with the exception that it calls a chunk for the news post styling:

            <div class="pagestory">
            <h2>[+pagetitle+] | [+longtitle+]</h2>
            <p>[+content+]</p>
            <p>[+createdon+] by [+createdby+]</p>
            </div>


            I am getting closer I think to solving this, however the only thing that is showing up on this page now is the word ’by’ and then my div seperator at the bottom of the post. It doesn’t appear to be pulling the code from the article that was created. I created a new article on the site called Friday test if you want to follow the link and see what it is doing.

            I can view the page source and see that the styling is in place, just no information has been pulled from the input from NewsEditor/NewsManager.
              • 8619
              • 229 Posts
              Ok, I have figured it OUT! I created a TV to show the final page and have got that working.

              The next issue is when the new post is created, if several paragraphs of text are entered (using the Lorem for now), it is not seperating the paragraphs out. An example is if I use a paragraph of the Lorem, then hit return for a new paragraph in the NewsEditor page creating a new post, and then another paragraph of Lorem, it is running it all together.

              Any clues on this one?
                • 8619
                • 229 Posts
                I ended up solving my own question......

                http://modxcms.com/forums/index.php/topic,10726.0.html

                Hope this helps someone!