We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14090
    • 12 Posts
    Hi All,
    I have a client who is not tech savvy at all and I am worried they will be confused by the CMS manager unless I really simplify their responsibilities. As such I’m more worried about how the client will interact with the CMS to administrate features than I normally would be.

    They have a requirement for the homepage (and other pages in fact) which is to manually choose articles from different sections to appear summarized on the homepage. There is no maximum or minimum for the number of articles they might want to feature.

    I don’t want to use a ’promote to homepage’ checkbox TV within the articles as I’d like this feature administrated from a single page view so that all the featured articles can be seen in one place. I have thought about using a module to administrate this with a new database table which would be fine, but I would prefer that everything to do with the homepage was administrated from within the homepage edit screen so as to avoid confusion for the client.

    I’m sure this isn’t a hugely out of the ordinary feature, so I thought I’d ask everyone if they have implemented something like this and how they did it? Thanks in advance!
    James.
      • 34017
      • 898 Posts
      You could do a multiple select TV on the homepage. Use the @SQL binding to list every page possible.
        Chuck the Trukk
        ProWebscape.com :: Nashville-WebDesign.com
        - - - - - - - -
        What are TV's? Here's some info below.
        http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
        http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        And to simplify matters, it would probably be best in this case for the home page to have its own template, so the TV you use for this won’t be on any of the other document’s editing screens.

        Depending on how far you’re willing to go for this, you could make a plugin to add a TV input with a bit of javascript to allow him to simply click on the documents he wants to summarize. When I added that feature to the weblinks editing page, I studied how the parent selection feature works and borrowed its code. Hmm. That would actually be a useful TV input type anyway, a "document select" type. Just a variation on an ordinary text input...maybe that will go on my to-do list!

        In any case, just use the TV in the &parents parameter of the Ditto call on the home 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
          • 7231
          • 4,205 Posts
          That would actually be a useful TV input type anyway, a "document select" type. Just a variation on an ordinary text input...maybe that will go on my to-do list!
          Sounds good to me grin
          There would most likely need to have a ’sort’ or ’grouping’ feature as well.
            [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

            Something is happening here, but you don't know what it is.
            Do you, Mr. Jones? - [bob dylan]
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            I mean just simply being able to click on a document in the Tree and its ID gets inserted into the field automatically. I’m not sure what you mean; I would think for grouping you’d just use multiple TVs, one for each group.
              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
              • 14090
              • 12 Posts
              Thanks for the feedback guys. I’ve used Susan’s recommendation (the point and click to grab document ID) previously and the client was quite happy with it.

              I have an idea for simplifying this even further though it will require a change to some of the core files. Like I said previously my main aim is to provide an idiot-proof intuitive UI for my client based on their exact needs rather than create the most code-elegant solution, though I will try my best to achieve both. I will post my findings when it is done! Thanks all.

              James.
                • 42141
                • 73 Posts
                This is quite close to what I want to achieve: on my homepage I want to promote pages (or putting them in the spotlight) of my website. Preferably with a small picture and some lines of text. What also would be nice if it alternated the list itself after a certain timeframe, so that I wouldn't have to manually pick the set of articles to be promoted this week or month.

                How can I do this best?

                Thanks smiley
                  • 3749
                  • 24,544 Posts
                  Here's a very low-tech way to do that. I think it would work.

                  Create a chunk called HomePageResources.

                  In it, put nothing but a comma-separated list of IDs that get shown on the Home page (no spaces).

                  Create another chunk (let's call it TeaserTpl) with tags to serve as the Tpl chunk for getResources and specify it in the &tpl property of the getResources tag on the Home page. Something like this:

                  <div class="resource_preview">
                      <p>[[+pagetitle]]</p>
                      <p>[[+introtext]]</p>
                  </div>
                  


                  Put a getResources tag on the Home Page where you want them to appear, with these properties:

                  &tpl=`TeaserTpl`
                  &parents=`-1`
                  &resources=`[[$HomePageResources]]`
                  


                  Now, all the user has to do to update the display is to note the IDs of resources in the Resource tree to be shown and type them into the chunk (and remove the ones that should no longer be shown). If they know the name of a Resource they want to add or remove (or part of it), they can use the search box at the top of the Resource tree to find out the ID. [ed. note: BobRay last edited this post 13 years, 2 months ago.]
                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting