We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    It will be called in your template’s HTML head, just like any HTML link to its CSS file.
      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
      • 20041
      • 83 Posts
      Thanks.
      1) If I want a (second)css file linked to only one of the pages how do I call that? As usual in the common template? It is not needed in the other pages.
      2) Also can I style the page, where individual news items are added? where do I specify the styles?

        • 28042 ☆ A M B ☆
        • 24,524 Posts
        You can use a snippet that makes a $modx->regClientCSS($css) function call. The $css variable can be the name of a CSS file, or a full chunk of CSS code in <style...> </style> tags. Put that snippet in your document, and now only that document will have that link/block of CSS in its head.
          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
          • 20041
          • 83 Posts
          Thanks a lot, Susan.
          But I cannot seem to add style to the posts.
          What I did was add my own values to the attributes from the samplesheet
          (as provided in the documentation pdf) I added these to my default stylesheet.
          Am I doing it right?
            • 33337
            • 3,975 Posts
            A link to website would be helpfull!
              Zaigham R - MODX Professional | Skype | Email | Twitter

              Digging the interwebs for #MODX gems and bringing it to you. modx.link
              • 20041
              • 83 Posts
              Quote from: zi at Jun 20, 2006, 02:51 AM

              A link to website would be helpfull!
              sadUnfortunately, its on a local pc.
              I’m testing it before going online.
              If there is some post where styling entries (Ditto) is discussed, please forward the link. I cannot seem to find any.
              Thanks.
                • 33337
                • 3,975 Posts
                I dont get it! Styling is really simple, I guess you dont have grip on basic css ? if this is the case, you have to learn CSS before! no offence!

                Here is a link to get started: http://www.wpdfd.com/editorial/basics/index.html

                Hope it helps.

                regards,

                zi
                  Zaigham R - MODX Professional | Skype | Email | Twitter

                  Digging the interwebs for #MODX gems and bringing it to you. modx.link
                  • 20041
                  • 83 Posts
                  embarrassed Actually , no probs with the css.
                  I wanted to know the attributes whose values are to be set..
                  Like in the ditto help pdf,
                  I set values for .ditto_article, .ditto_title ...etc but it doesn’t seem to work.
                  Thanks for your time.
                    • 33337
                    • 3,975 Posts
                    Look at the chunk below:

                    <div class="ditto_summaryPost">
                    <h3 class="ditto_title"><a href="[~[+id+]~]">[+title+]</a></h3>
                    <div>[+summary+]</div>
                    <p class="ditto_link">[+link+]</p>
                    <div style="text-align:right;">by <strong>[+author+]</strong> on
                    [+date+]</div>
                    </div>
                    


                    You are not bound to use them, design your post block in your HTML editor, apply styles on it. When you get done, replace sample content with Ditto tags and put in chunk, upload css file and thats it.

                    For example, I use DIVs for all:
                    <div class="ditto_summaryPost">
                    <div class="post-title">[+title+]</div>
                    <div class="post-summary">[+summary+]</div>
                    <div class="post-link">[+link+]</div>
                    <div class="post-author">[+author+]</div>
                    </div>
                    


                    Hope it helps.
                      Zaigham R - MODX Professional | Skype | Email | Twitter

                      Digging the interwebs for #MODX gems and bringing it to you. modx.link
                      • 20041
                      • 83 Posts
                      rolleyes seems like exactly what i need.
                      thanks a million.