We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14369
    • 19 Posts
    Quote from: dev_cw at Feb 11, 2009, 01:59 PM

    Link syntax in MODx is href="[~123~] where 123 is the document ID. This will automatically generate the link according to your site settings. If you are using Search Engine Friendly URLs then the link will use the alias, if not it will have the ?id=123 in the URL.

    I used that syntax, and modx does generate the link as you said, on the address bar on the bowser it changes from id=1 to id=2 etc, but the page still stays the same, that’s what was happening before, the page doesn’t change to the content that I would see if I preview that page?
      • 3749
      • 24,544 Posts
      That should be href="[~123~]" (I assume that’s what you’re doing). Do you have a <base href ... tag. That might help. Also, make sure for now that "friendly URLs" are turned off in tools | configuration and the there is no .htaccess file in the root (it should be ht.access for now since you don’t want it).
        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
        • 14369
        • 19 Posts
        htaccess is as you said, friendly urls is off, using the snytax as you stated, nothing! Whatever I do it stays on the same page; the page it stays on is id=0

        I’ve created 3 different pages all from the same template, I’ve added a few lines on content, different on each and an image on the first page, so I’ve got an id 0 id 1 id 3 when I preview the pages from the modx panel, they are all as I’ve made them (different), the same template with altered content, the menu (for now) is hard coded into the template since I’m still learning this.

        My menu items are all in seperate DIVs like below

        <div class="tabs"><p><a href="[~0~]" title="Gallery" Class="tab">Gallery</a></p></div>
        <div class="tabs"><p><a href="[~1~]" title="Gallery" Class="tab">Gallery</a></p></div>
        <div class="tabs"><p><a href="[~3~]" title="Gallery" Class="tab">Gallery</a></p></div>

        When I click the corresponding link on the page, the url changes to index.?id=.... but the page just stays on the original page, can’t see what I am doing different for the demo template version, apart from the fact that I’m not using wayfinder for a menu but have a hardwired one; I’,m coming to the end of myself now!

        Thanks for trying



          • 14369
          • 19 Posts
          PS, added a base href too - no difference
            • 3749
            • 24,544 Posts
            Quote from: Jobborrow at Feb 11, 2009, 03:10 PM

            PS, added a base href too - no difference

            That was my last idea (other than a corrupt download, which is unlikely since the manager is working so well). Make sure there’s no index.htm or index.html laying hiding in the root dir.

            BTW, ending up on page 0 is just MODx’s way of telling you that the requested URL can’t be found. It defaults to the site home page whenever it can’t find a requested page.

            Here’s a thought, since we’re grasping at straws, the id numbers to use for the links are the ones in parentheses next to the document name in the tree at the left. You knew that, right?

              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
              • 14369
              • 19 Posts
              Amazing! You’ve solved my problem!!!! grin

              I was thinking that the menu index no was the the ID, I was wondering what those numbers were for DOH!

              Thank you very much for working with me there, it’s just so simple when you know how!

              Thanks again.

              My next learning curve is to create an extra editbale section on a page so it can have [content] and another TNYMCE editble area, can you point me in the right direction? Chunk or Snippet? I’m thinking snippet?

              Any pointers?

              Thanks
                • 3749
                • 24,544 Posts
                You want a Template Variable. The things in the document create/edit form such as [*content*], [*pagetitle*], and [*longtitle*] are Template Variables but you can easily create more.

                You create them on the template edit screen, then every page that uses that template can have those extra template variables. smiley

                  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
                  • 14369
                  • 19 Posts
                  Right, I’m working on this one, so let’s say I have a news box on the right of the page, sperate from the main [content] I create a richtext TV called news, I make it available to the template I’m workin with, do I then I have to go to the template itself and add [*news*] where it could appear, and say that box on the other pages needed to have other things in it would I create them the same as above and add them all in the template itself but only edit the on I want on the page I want if you know what I mean???!!! undecided

                  I’ve just tried what I said above and I get a text (ish) input (ish) box on the screen that isn’t in keep with the body etc, where am I going wrong? Thanks so much!
                    • 14369
                    • 19 Posts
                    good news is I’m starting to answer my own questions, but I don’t seem to be able to get it so it’s just normal editble text with the Tnymce editor available, as soon as that’s available it’s apprearing in a big white box, any thoughts?

                    thanks
                      • 3749
                      • 24,544 Posts
                      Quote from: Jobborrow at Feb 11, 2009, 06:00 PM

                      Right, I’m working on this one, so let’s say I have a news box on the right of the page, sperate from the main [content] I create a richtext TV called news, I make it available to the template I’m workin with, do I then I have to go to the template itself and add [*news*] where it could appear?

                      That’s it.

                      and say that box on the other pages needed to have other things in it would I create them the same as above and add them all in the template itself but only edit the on I want on the page I want if you know what I mean???!!! undecided

                      I’ve just tried what I said above and I get a text (ish) input (ish) box on the screen that isn’t in keep with the body etc, where am I going wrong? Thanks so much!


                      I try to get by with a single template if I can. It almost always works except for very specialized pages. The TVs will show up in when you edit the doc and you can put whatever you want in them. I think there’s a plugin that keeps empty TVs from being displayed but let’s skip that for now.

                      As for the style not matching, it’s just a matter of adjusting the template (and sometimes the CSS) -- e.g. putting <p></p> or <div></div> around the TV tag.
                        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