On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • This is what "TV" for.

    Use something like this:

    <div id="right-column">
    <div id="left-column">

    Now you are able to input separate content for every page you have. And if you want to make them editable by QuickEdit, then prefix "#" to tv name e.g. [*#right-column*]

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

      Digging the interwebs for #MODX gems and bringing it to you. modx.link
    • Pretty nifty tutorial Raymond, I’ll take the time to translate in french when I get the chance... and use it myself when the need arises !
      Thanks smiley
        .: COO - Commerce Guys - Community Driven Innovation :.

        MODx est l&#39;outil id

      • I’m working on a similar feature without using TVs, just a custom snippet; what I want for my side columns is content that changes automatically following the site section the visitor is browsing, for example:

        Left Column -> latest News (Ditto snippet pulling from the News Subfolder)
        Right Column -> Tag cloud (another snippet configured on document keywords)

        Left Column -> sub-nav list of arguments (DropMenu snippet from the Activities submenu)
        Right Column -> Related arguments (ListRelated snippet)

        Left Column -> some other specific Chunk
        Right Column -> more stuff saved in a chunk

        The side columns are not directly editable as with TVs, but still this gives a very dynamic site, all managed with a single template. There ’s really no limit to each column content you can have multiple calls to different snippets; and/or calls to Chunks and TVs for each section.

        The Snippet php code is pretty simple: starting from the current doc ID I reconstruct its position in the site document tree; then I just have an if-block that returns different chunks or Snippet calls by matching the docID and parentID with the sections IDs.

        Inside the HTML template I have one call to the snippet from each side column; I do pass the column value (left, right) as an argument in the snippet call, but one can also create a specific Snippet for each column to avoid passing this argument (de gustibus).

        I’m using the same technique with another Snippet that takes care of the header: the site is going to be bi-lingual thus in the root level I have 2 folders, one for english and one for italian docs; this snippet checks if the current doc is in one folder or the other and loads the GUI (main navigation block) in the correct language.

        • Quote from: xwisdom at Sep 12, 2005, 02:37 PM

          Quote from: bugaev at Sep 12, 2005, 12:50 PM

          Sorry, may be I had not catch something undecided, but both right- and left-side-coloumn content automaticaly displays on all pages with this 3-coloumns template. So, I can’t change the left and right columns for a specific document without affecting other documents. In order to do that I need to create another set of TVs for each document types. Please, clear this topic to me rolleyes

          If you make the change from the withing the Default Value of the TV then it will affect all pages. You should only make the change from when editing the document

          Okay, I just want to make sure I understand this, because I’m just starting to grasp this TV concept. Referring back to the original tuturial in the first post: The ?My Left Sidebar? and ?My Right Sidebar? documents contain the default contents of the MyLeftColumn and MyRightColumn TV’s, respectively. Therefore, left alone they contain the same content on every page in the site.
          So if I wanted to change the contents on the right sidebar of one of my pages (for example: replace a menu with a chunk). I would have to create a NEW document (for example, ?My Right Sidebar 2?). And on that particular page, I change the value of the MyRightColumn TV to ?My Right Sidebar 2?
          Is that what you mean? Because if I simply edit the original ?MyRightSidebar? document, it will change every page, right?
          • I have a template with a right column <div> which only contains a TV, [*rightcolumn*]. Same for the left column. I have default values in the actual TV for both. Now, for every document I make using that template, I have an edit field for those TVs just below the doucment content edit field. If I do nothing, that page will have the default content. If I edit the content for that document, that page will show my edited content.

            So while the TVs will have default content, for every document you can edit the TV for that document.

            You can browse through the manager of my site if you want to see what I mean.
              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
            • I’m getting a Parse Error when I try to do this. what would cause this?

              « MODx Parse Error »
              MODx encountered the following error while attempting to parse the requested resource:
              « Execution of a query to the database failed - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '>
              ) AND sc.published=1 AND sc.deleted=0 ) »
                    SQL: SELECT DISTINCT sc.* FROM `modx`.modx_site_content sc LEFT JOIN `modx`.modx_document_groups dg on dg.document = sc.id WHERE (sc.id IN (47
              ) AND sc.published=1 AND sc.deleted=0 ) AND (sc.privateweb=0) LIMIT 1 

              EDIT: Not sure what this problem was but I changed it to the way sotwell did it on her site, not using the @ binding, just made a TV, gave it access to my template, and then called it in the template. that easy. thanks sotwell for access to your manager!!