We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36426
    • 197 Posts
    Hi I set this site up here: http://www.yorkportraitstudio.co.uk

    I made two templates, one for the front page and one for the others. However when you click a link the template doesn’t change even though it’s defined in the resource, and the content doesn’t show up!! Can anyone please help or take a look at it for me.

    Thanks. smiley
      Yorkshire UK based hosting provider: https://www.simulant.uk
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Looks like it’s getting a 404 not found error; your home page is no doubt set to be the error (not found) page.

      Please look at the block of red text that starts "HEY YOU, READ THIS!" before you post problems like this. We cannot begin to guess what the problem might be without knowing this information.
        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
        • 36426
        • 197 Posts
        Hi thanks for your reply. I don’t get an error or 404 etc, the link works fine and shows at the top such as: http://www.yorkportraitstudio.co.uk/prices.html

        but whatever page you navigate to you just get the front page showing up... not the template and content as set in modx interface for that link.
          Yorkshire UK based hosting provider: https://www.simulant.uk
          • 8609
          • 607 Posts
          Did you assign the inner template to the inner pages? Also, are you using the content tag to pull your dynamic page content into the template?
            • 36426
            • 197 Posts
            hi thanks, yeah i’m using the call [[*content]] in my templates and yes i’ve assign the different templates to the different resources/pages so I’m stuck as to why it’s not changing when clicking...
              Yorkshire UK based hosting provider: https://www.simulant.uk
              • 29019 ☆ A M B ☆
              • 104 Posts
              It doesn’t look like a 404 page, because your 404 page is set to your home page, but it is indeed sending a 404. If you have Firebug for Firefox, look at the net panel when you navigate to a secondary page, and look for the red letters.

              http://www.yorkportraitstudio.co.uk/index.php?id=2

              It looks like that’s working (and I’m assuming that’s your other template), so you probably have a friendly URLs problem. Did you check your .htaccess file?
                www.darkstardesign.com

                Are you in the Nashville area? Join us for our next MODX meetup!
                • 36426
                • 197 Posts
                aaah thank you so much. I didn’t even think of that, I hadn’t renamed my ht.access file. Thanks again.
                  Yorkshire UK based hosting provider: https://www.simulant.uk
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Quote from: jonah at Feb 05, 2011, 01:27 PM

                  Hi thanks for your reply. I don’t get an error or 404 etc, the link works fine and shows at the top such as: http://www.yorkportraitstudio.co.uk/prices.html

                  but whatever page you navigate to you just get the front page showing up... not the template and content as set in modx interface for that link.
                  You won’t get a standard 404 page because MODx is intercepting it, and loading the site’s "error page". By default, that is resource #1 (what you refer to as the "front page"). It will still show the URL triggering the error in the browser address bar, since that is the page you requested.

                  You should create a dedicated resource to handle 404, something like "Sorry, we couldn’t find the page you wanted, maybe you can find what you are looking for here?" and have a site tree or a search form. Then go to the Configuration and change the Error Page id to the id of the new resource. That way it’s much less confusing when you see 404 not found or other errors.
                    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