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

    how can i show some sidebar-item ONLY on the first document (start page)?

    is there some code like "if doc = 1" or shomething?

    sorry, i am not a coder smiley

    Thanks in Advance!
      • 22815
      • 1,097 Posts
      If you want to avoid code, you’re in luck. You can have different template for different types of page. So just have a different template for your homepage.

      Duplicate your template, call it Homepage Template or somesuch.
      Put the sidebar in that template only.
      Edit the homepage so that it uses Homepage Template.
        No, I don't know what OpenGeek's saying half the time either.
        MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
        Forum: Where to post threads about add-ons | Forum Rules
        Like MODx? donate (and/or share your resources)
        Like me? See my Amazon wishlist
        MODx "Most Promising CMS" - so appropriate!
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Easier to make a TV for the sidebar content, give it the default that you want on all the other pages. Then on your home page document edit the TV to whatever you want on the homepage. And if you happen to have other pages that you want to have custom content, you can just edit their TV.
          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
          • 7923
          • 4,213 Posts
          And if you want to do it within code, you’re in luck too wink if ($modx->documentIdentifier == $modx->config[’site_start’]) { ... }


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 20761
            • 27 Posts
            hey. you guys all rock!

            THANKS A LOT!