We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25121
    • 4 Posts
    First off hi all and a very well done with Modx - great product u got there.

    I am a user of the original etomite and found it to be the best, easiest and most simple cms package around. when i heard about them stopping development i was distraught. however i heard about the modx fork and i have been following its progress. The main difference i find with the two are the new feature called TV - i just cant get my head round it. i read one of the tutorials about using TVs to apply blocks of content to a page but i dont understand why u couldnt just use [[GetPage?id=11]] to the same effect??

    so anyway, i thought the best way to learn was to try it out. so i thought i would try and make a TV for my menu which would allow u to select which link in the menu would be blanked out (given an active state) so that the user knwos wot page or within which area of the site they are in (kinda like a breadcrumb trail). this would be the html:

    <div id="navcontainer">
    <ul id="navlist">
    <li id="active"><a href="#" id="current">Home</a></li>
    <li><a href="#">Blog</a></li>
    <li><a href="#">Articles</a></li>
    <li><a href="#">Links</a></li>
    <li><a href="#">Contact</a></li>
    </ul>
    </div>


    you can see that the id active and current are applied to the li and a element respectively. the css would then style the element to grey it out or to disable the mouseover effect or whatever. i then went about setting up my tv. i gave it a name of ’menu’ and set it to ’radio options’ and set the input value options to: Home Active Link==@CHUNK home||Blog Active Link==@CHUNK blog etc

    and then each chunk would have the same html as above but with the id active and current in the corressponding place.

    this method worked fine no problems, but then i thouht to myself wots the point of doing that? maybe i didnt use the TV properly i dont no thats why i am posting or maybe i am not meant to use a tv at all?? the problem with this is if i edit/add/delete an item from the menu i would have to change all the chunks which sort off takes away the centralisation benefit of using a cms.

    so my next idea was to integrate the TV somehow with the menubuilder so that it would automaticall generate the menu hierarchy but with the ’you are here’ feature of the menu. and this is where i got stuck - i had no idea how to do this...

    so i ask you kind, good people
    - am i using tv correctly in the first place?
    - should i have used another method?
    - is it possible to fix my menu?

    thank you for you time peeps - i know how valuable it is,
    regards.
      • 18397
      • 3,250 Posts
      Quote from: ritchie at Sep 04, 2005, 08:23 PM

      so i ask you kind, good people
      - am i using tv correctly in the first place?
      - should i have used another method?
      - is it possible to fix my menu?

      Well, you can use a tv for this but there is a much easier method using a differant menu snippet. See this post for information.
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        What I mostly use TVs for is to have a drop-down list of available chunks, usually containing a snippet, that is available on all documents. Then I can select from that drop-down which chunks I want on any given page. This way I can control the "blocks" in my sidebar. Since my sidebar is in the template, I would otherwise have to have a different template for every page if I wanted different content in the sidebars, or have the sidebar HTML in the content of each page.
          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
          • 14267
          • 113 Posts
          Hmm, I like Susan’s idea. Perhaps a topic under Tips is in order, for everyone to submit their ideas on ways to use TV’s. I like using them for different content areas in a page, that a user can then edit in the frontend via QuickEdit. For instance I’ll create a TV called ’mainimage’ that puts a lead image on a news article, and insert that in the template. Then the tag <quickedit:mainimage /> allows a logged-in manager user to choose the image right on the page.
            • 25663 MODX Staff
            • 12,272 Posts
            Perhaps a topic under Tips is in order, for everyone to submit their ideas on ways to use TV’s. I like using them for different content areas in a page, that a user can then edit in the frontend via QuickEdit. For instance I’ll create a TV called ’mainimage’ that puts a lead image on a news article, and insert that in the template. Then the tag <quickedit:mainimage /> allows a logged-in manager user to choose the image right on the page.

            Great idea and a wonderful starting tip. Go forth and create, sir!
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 25121
              • 4 Posts
              thank you all very much for your replies.

              i feel stupid because i searched the forums before i posted but didnt find that article that mark pointed out.

              ok, i will post a new topic in the tips section so that all you guys can post example usages of TV to help people like me understand the concept and power of this feature. maybe you can then expand into widgets? and other features of modx...
                • 18397
                • 3,250 Posts
                Quote from: ritchie at Sep 05, 2005, 07:24 PM

                i feel stupid because i searched the forums before i posted but didn’t find that article that mark pointed out.

                Hey! There is nothing to feel bad about. Your use of a TV was quite clever to solve your problem.

                Quote from: ritchie at Sep 05, 2005, 07:34 PM

                Maybe the next release of modx could include example TVs for the example site that is installed...

                I can’t say much, but hopefully the new MODx default install site should have some examples soon. I am finishing up a MODx demo site with several snippets, plugins, tv’s, and modules at work. More info on that later in a separate thread.......