We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2376
    • 21 Posts
    Working on my first modx site, please excuse my stupidity...

    I have a site that needs to have three kinds of pages, the home page, a general content page and a news page.

    On the home page, I need to have a content area, a sidebar with a few news stories in it and an area to highlight some information.

    The news page needs to have all of the news on it

    The content page just needs plain old content.

    Do I need three templates?

    Thanks for your help.
      • 32241
      • 1,495 Posts
      Hi,

      It’s all depending on your template. If you have 1 template with the main content of the template can be reused over and over, than this is what I’m gonna do.

      Create 1 template. Create 3 pages using that same template. Add [*content*] on the main content are for the template. Create several TV and assign them to your template.

      Now the basic setup is done.
      For your plain page, just fill anything on the content area and you’re done.
      For the homepage, you need to put all the TV tag that you’ve just created, for example [*tv_name_1*] [*tv_name_2*] and etc on your content area with special html formating to place them nice on the main content area of your template.
      For your news page, just add child cos under it, and use newslisting snippet [!Newslisting!] on your main page, and it will automatically fetch all the child pages automatically and display them as a news listing wink

      That’s all. You might need to get use with all the features on MODx first, so it’s better to get started on documentation grin

      All the best and Have fun!
        Wendy Novianto
        [font=Verdana]PT DJAMOER Technology Media
        [font=Verdana]Xituz Media
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        I usually create a single template, then put TVs with textarea (or RTE) input for each area of the template where I’ll want content. The default [*content*] goes in the main content area, then [*left*] goes in the left sidebar (for example). I’ll put whatever I usually want in the left sidebar as the default when I create the TV. This way I can edit what goes in the left sidebar for each page; even leave it blank if I want it to be empty. If you want to have main content take up the whole page on one page, just in your document’s content surround it with a named div container, then in your css position it with a negative left margin to move the left edge over into what in another page is the left sidebar.
          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
          • 2376
          • 21 Posts
          Can I apply CSS to a TV?
          How do I call the CSS to the TV?
          Thanks.

          Also, if a TV is empty, it doesnt show up? right?
          Thanks. ad
            • 18397
            • 3,250 Posts
            Quote from: atracksler at Mar 06, 2006, 09:02 PM

            Also, if a TV is empty, it doesnt show up? right?

            Yes. That is correct,

            Quote from: atracksler at Mar 06, 2006, 09:02 PM

            Can I apply CSS to a TV?
            How do I call the CSS to the TV?
            Thanks.

            You can style the OUTPUT of your TV by wrapping it in a html tag (say a div tag) and calling it in your css file respectively.

            Hope this helps!
              • 2376
              • 21 Posts
              do I wrap the TV in the template or somewhere else?

              will it still not show up if its empty, if its wrapped in a div that, for example has a beackground color?

              Thanks. ad

                • 32241
                • 1,495 Posts
                Quote from: atracksler at Mar 07, 2006, 05:34 PM

                do I wrap the TV in the template or somewhere else?

                will it still not show up if its empty, if its wrapped in a div that, for example has a beackground color?

                Thanks. ad

                I believe div will disappeared if there is nothing inside the div, but I’m not 100% sure. You might want to test it out.
                  Wendy Novianto
                  [font=Verdana]PT DJAMOER Technology Media
                  [font=Verdana]Xituz Media