We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16183
    • 1,390 Posts
    @Louis,

    [*pagetitle*] is a document specific template variable (TV) that comes with modx. It gets its value from the "Title" field of your document. When editing a document, you can see a "Title" field under the "General Tab" - it is the first field.

    Say, you put [*pagetitle*] in your template the way you’ve explained above. You then create a modx document in the editor, and you will give it a title, say "Home". . For this particular document you have created (Home) modx will replace the placeholder [*pagetitle*] with the title you gave your document, so "Home" will be the title. If you have another page which you give a title, say "Food",  when viewing that particular page, the title of the page will be, "Food".

    Basically, whatever you put in the Title field for each document is what will appear in the [*pagetitle*] . Meaning, you obviously have to edit your pages and give them unique page titles (assuming you want your pages to have unique page titles). If you leave the title blank, then you will get that - a page without a title. Hope I haven’t confused you further wink

    Have you read Bob’s guides? I suggest you do this if you haven’t. Read them in concert with Susan’s guides (she gave you a link above). Bob’s are here: http://bobsguides.com/MODx.html

    cheers/k
      • 25581
      • 16 Posts
      roulettered56 Reply #12, 18 years ago
      So really I’ll have to create and build each page separately.

      I’m looking for a CMS in which I have a template controlling ALL pages and I just have to add content/articles to each page and assign a few things like title and URL etc.

      If one day I don’t like the way a sponsor ad looks I can just delete the chunk/and or Variable and each page would not show the sponsor ad instead of deleting it from each page separately (for example).

      Also, by "document" do you mean web page?

      Thank you,
      Louis
        • 3749
        • 24,544 Posts
        Quote from: sottwell at Oct 07, 2008, 02:15 AM

        BobRay, you’re spending too much time with Revolution! That should be
        <h1>[*longtitle*]</h1>


        No kidding. wink Corrected.
          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
          • 16183
          • 1,390 Posts
          I think we are getting lost in words here  :D Kidding aside....

          I haven’t seen nor heard of any CMS whereby you won’t have to create pages separately.

          With modx, yes, you can have a template controlling ALL pages. If you want more than one template for different documents, that’s fine too.

          Yes, documents = pages (not in modx revolution, but that’s another story)

          Assigning a few things like title is what I’ve just described in my post above. You create a document and give it a title. It’s that simple. You only have to put [*pagetitle*] once in the template you are using. However, for the individual pages (documents) you have to write something in the Title field since what goes in there will be your page title.

          As for changing one variable and have it affect multiple documents, you can do that when you get deeper into TVs. That is not appropriate in this case and IMHO I suggest that you get the basic understanding first of how modx works before venturing into other TV  stuff.

          If one day I don’t like the way a sponsor ad looks I can just delete the chunk/and or Variable and each page would not show the sponsor ad instead of deleting it from each page separately (for example).

          This is way easy to do in modx. Again, get the basics first.

          /k

          ps: out of curiosity - are you coming in from joomla? I ask because I notice you referred to content as articles. if that is the case, modx is really very different from joomla and you might have to de-joomla, for lack of a better word wink

            • 25581
            • 16 Posts
            roulettered56 Reply #15, 18 years ago
            I can’t beleive how patient you guys have been with me smiley

            Of course I’d have to create/make a new page and by applying a title in the
            new page field the template would flip that to the [*pagetitle*] area correct?

            I put " my new page title 3120 " in the correct new document Title field
            and <title> [*pagetitle*] </title> becomes <title> my new page title 3120 </title> assuming
            I had the [page title] variable in the template code?

            I’m coming from loads of CMS’s including Joomla laugh

            Louis
              • 3749
              • 24,544 Posts
              Quote from: roulettered56 at Oct 07, 2008, 10:13 AM

              So really I’ll have to create and build each page separately.
              You’ll have to do that in any CMS unless you want every page to have exactly the same content. smiley


              I’m looking for a CMS in which I have a template controlling ALL pages and I just have to add content/articles to each page and assign a few things like title and URL etc.

              If one day I don’t like the way a sponsor ad looks I can just delete the chunk/and or Variable and each page would not show the sponsor ad instead of deleting it from each page separately (for example).

              Yes, that’s exactly how MODx works (and why we all like it so much). The stuff in your template (including any chunks) appears on every page and changing it changes every page.

              When you create or edit a document in MODx, you’ll fill in or edit the "content" field which will then appear where you put the [*content*] tag in your template. IOW, in your template, everything that goes on all pages is there in the template, everything that will be different for different pages is represented by Template Variable tags, [*variable*], or by chunks or snippets.

              Also, by "document" do you mean web page?
              A document is not quite the same as a web page in MODx, although there is generally a one-to-one correspondence. If you’d like to know the difference, *please* read the page the link in my signature at the bottom of this message takes you to (look at the "documents" section).

                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
                • 16183
                • 1,390 Posts
                Quote from: roulettered56 at Oct 07, 2008, 10:36 AM

                I can’t beleive how patient you guys have been with me smiley
                Ye, people are really friendly in this little corner of the world smiley

                Of course I’d have to create/make a new page and by applying a title in the
                new page field the template would flip that to the [*pagetitle*] area correct?

                I put " my new page title 3120 " in the correct new document Title field
                and <title> [*pagetitle*] </title> becomes <title> my new page title 3120 </title> assuming
                I had the [page title] variable in the template code?

                Correct