We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26310
    • 130 Posts
    Greetings,

    Is it possible to pull a page title from a different page? For example:

    https://www.sbgroovygrooms.com/

    In the above site each link is hardcoded in there. I don’t mind making a snippet but I’m curious as to my workflow. Here’s what I’m thinking huh

    I create template variables for the menu locations...let’s call them boxes since I’m using the 960 grid system. For brevity we’ll name them Box1, Box 2, etc.

    Each box has a title. In this case Groom, Bath, About Us, etc, etc....

    Is it possible to use a snippet and pass [*box1*], [*box2*], [*box3*], etc; TVs and in return get the page titles of the ID I use in those TVs? Am I even explaining this right?

    In essence I want 6 boxes with titles from whatever 6 page ids I enter in the corresponding TVs.
      I twitch because I care....and drink too much coffee.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Why not use Ditto? I’ve done a number of sites with home pages like this. The content of each box is in the respective document’s summary (introtext) fields, and the custom chunk tpl for Ditto uses [+pagetitle+] for the links and [+introtext+] for the body of each block. The layout is of course handled with CSS.
        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
        • 26310
        • 130 Posts
        Do I just use one Ditto call to rule them all? Sorry I couldn’t resist tongue

        Or am I using Ditto multiple times over?

        ...hmm now that I think about it if I run ditto with the box CSS it should just wrap to the next line.....thus creating a new row of boxes.....I’ll experiment, thanks for the reply.


        Come to think of it how would I handle the unique icons? Right now they’re background images called in the CSS file.
          I twitch because I care....and drink too much coffee.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          You can have Ditto add an ID to each one, in the Ditto chunk-tpl add id="block[+id+]" and then you can still specify the background image for each one.
            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