We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5337
    • 6 Posts
    Hi
    I’m going round in circles trying to figure out the best way to achieve something, partly because I can’t find any documentation on the snippets I’m interested in - GetField and DynContent look like they may be useful.
    I’m also on a very short timescale so haven’t really got time to install and play with everything... so any advice from the resident pros would be appreciated!

    So, here’s the situation...

    The website is for a salon. There’s a main nav at the top and then a side menu with all the current treatments on (all Wayfinder driven, presumably). One of my main nav links will open a new window, kind of like a ’mini-site’ branching off the main site, which will be about a secondary service.

    Some of the treatments cross over between the main site and the secondary one, so what I want to do is to prepare the main pages and have the secondary site pull in the same content, but allow it to be styled slightly differently. So, what’s the best way to achieve that, please?
      • 33982 ☆ A M B ☆
      • 476 Posts
      Greetings cinnamondem, and welcome to the MODx forums! smiley

      Quick question, I am assuming that this "secondary" site is still in the CMS? Still on MODx, correct?

      Using Ditto, you can pull content from anywhere in the site. For example, if you have content from a specific document you want to put on the homepage, you can create a Ditto call on the homepage, pull from that specific document (or documents) and specify the tpl (how familiar are you with Ditto at this point?) and style the content however you would like. Then on the other part of the site (i.e. in the "secondary" site), you can pull from that same document where the content resides but use a different tpl with different styling. Ditto is probably one of the most important snippets you’ll use in MODx and it’s super flexible.

      One example of what I’m explaining above. On my business website, I have a blog section:

      http://www.my619.com/blog

      But I want the blog content to also output on the bottom of each page throughout the site but with a different styling...for example at the bottom of the homepage:

      http://www.my619.com

      I have 2 blogs being outputted at the very bottom that have different styling than the output of the blog in the blog section.

      Hope that makes sense...please let me know if you need more info...hopefully that will spur you in the right direction.
        Precision Web Development ... SmashStack.com
        • 5337
        • 6 Posts
        Thanks for the reply, Flinx.

        Yes, the other ’site’ is still within the CMS - essentially just with a different template and opening a page from one nav item in a new window, as per the clients wishes to make it look like a separate site but keeping on the same domain.

        I have dabbled with Ditto but in a news context. I recall this goes by a Ditto specific input page, but then was pulled out in a ’5 latest items’ style.
        Admittedly, this part of the site won’t be a regularly changing thing, but I want the client to be able to enter in the page of info on a new treatment as a ’page’ (I think you can get Ditto to make menu items?) and then be able to see same info from either the main treatment menu or within the new ’site’. Does this sound OK?

        I’ll download the bits and have a fiddle, anyway.
          • 5337
          • 6 Posts
          I had a brainwave grin (that’s what you get for coming back to it when you aren’t tired) I can make it far simpler by just creating the content for the ’duplicate’ pages as chunks.
            • 33982 ☆ A M B ☆
            • 476 Posts
            yeh, that will work too wink

            With MODx you’ll learn there’s many different ways to do the same thing ... you have to judge each situation and what works best.
              Precision Web Development ... SmashStack.com
              • 4385
              • 372 Posts
              I found three ways to get the job done.

              http://modxcms.com/forums/index.php/topic,26914.0.html


              But, I also ended up going with Ditto in the end.
                DropboxUploader -- Upload files to a Dropbox account.
                DIG -- Dynamic Image Generator
                gus -- Google URL Shortener
                makeQR -- Uses google chart api to make QR codes.
                MODxTweeter -- Update your twitter status on publish.