We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53414
    • 34 Posts
    Quote from: nuan88 at May 06, 2018, 07:55 PM
    Yeah Modx can host and serve your html pages easily, with no adjustments needed at all. Totally understand the issues with WP, its for people with limited skills mostly.
    Where are your html pages now? In your Modx tree or not?

    Well I have extremely limited skills but I have to do it, so am hoping to learn.

    The pages exist in html on my computer + plus over the years there are many backups on DVD.

    Only two original Resources exists in my Resource Tree, Homepage + it seems there was an attempt to port one of my html imagemaps to a chunk. Although my Developer created maybe 100 files in my Manager, many appear to be non-working coding attempts that aren't called by anything.

    The 5,500 files are what I find on my webserver by looking under SFTP. Since all the directories were renamed at creation I have to guess what are my html resources and what are Modx system files.

    I shouldn't ask a question here but as the # of Resources gets in the 100's is there a good way to track them -- by typing in the ID somewhere? Already I got an error
    Resource 15 is already using the URI south-america.... I found Resource 15 and it's not using that anywhere I can find.

    Also they installed 11 plugins i.e.:
    Ace
    BlogIt
    ClientConfig
    Collections
    getResources
    MIGX
    pThumb
    resizer
    Tagger
    TinyMCE
    Wayfinder (I really like this one)
      • 46886
      • 1,154 Posts
      Ok Julius, let's develop together a bit as we understand more.

      Now, its normal to have some snippets, chunks and so on, that's the second tab in the manager, but its probably the templates (top of second tab) and resource tree in the first tab that you want to focus on. And the number of files on the server is definitely not small, there are so many parts.

      The resources are where your page contents go, and each of those resources has both an ID number (15) and an alias, which is a word or words connected by dashes, and those words are usually taken directly from the resource title. You will see the alias on the right side, under template. You cannot dictate the ID number, it starts with 1 and keeps going up automatically each time you make a new resource.

      It is this alias that is now south-america...in resource 15, not in the page contents.

      The reason for the aliases is it helps google give our websites love. One great thing about Modx is it has all the nooks and crannies for us to put in data that helps google help us. That's what the friendly-urls comes in, it uses links to our pages according to alias (with ID used in backend) so google will know what those pages are about.

      It looks like you are on your way! Usually html is in the template (and chunks which are pieces of html to make updates or switches easy) and the resources are just contents, perhaps with some tools. [[*contents]] in the template pulls in whatever data is in that resource. (my code might be wrong depending on your system, check some templates to confirm).

      [[!something]] gives you the uncached value of (something), without the ! is cached, it matters sometimes whether you need the *updated* value or just the value. Chunks and Snippets might have slightly different calls, please confirm for your version.

      If a page is special and there's only one I just put it all in the template and leave the resource empty. If the template doesn't call the resource contents then it won't be shown.

      How many resources do you have now, in your tree? Sounds like at least 15 if you have ID 15! Those are your pages...and remember there's a couple with special roles like login and so on, they are resources too.

      Resources can be containers, click into any resource with a plus next to it, a resource (like say south-america-overview) can have both contents and child resources under it, like south-america-weather and south-america-culture.

      Also you can drag and drop those resources right into other resources as you organize them into the groups you want, if they haven't been organized yet smiley

      Your tables should live comfortably in the resources too, tables will definitely be managable. [ed. note: nuan88 last edited this post 5 years, 11 months ago.]
        • 53414
        • 34 Posts
        Quote from: nuan88 at May 07, 2018, 07:52 PM
        Ok Julius, let's develop together a bit as we understand more.

        each of those resources has both an ID number (15) and an alias, which is a word or words connected by dashes, and those words are usually taken directly from the resource title.
        It is this alias that is now south-america...in resource 15, not in the page contents.

        Resources can be containers, click into any resource with a plus next to it, a resource (like say south-america-overview) can have both contents and child resources under it, like south-america-weather and south-america-culture.

        Also you can drag and drop those resources right into other resources as you organize them into the groups you want, if they haven't been organized yet smiley

        Thanks very much for your comments.
        I seem to have a problem with the Alias. I wish to create a Resource with the alias south-america .It tells me error as another resource uses that alias. I find that resource is some blogit snippet created by my long-gone Web Developer that has nothing to do with that alias. I try to change the alias but can't. Thus I can not use the alias south-america for my Resource dedicated to South America?

        I'll show the problem. Note that nowhere does Resource 15 show using that alias. Also I can only display pix=900 pixels so I cut each page in half and the left is top and right half is below it.




        Here is the offending Snippet. Perhaps I should try to just delete it?


        [ed. note: julius nepos last edited this post 5 years, 11 months ago.]
          • 17301
          • 932 Posts
          I don't think the second screenshot is related to the issue (though I could be wrong). If you use the search icon at the top left of the MODX manager and search for south-america you should be able to find the resource(s) using that name/alias. You can either change the alias of the obsolete resource to free it up for you to use or go into system settings and make sure you have 'use_alias_path' switched on so that you can have multiple resources using the same alias, but with their own respective paths.
            ■ email: [email protected] | ■ website: https://alienbuild.uk

            The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
            • 53414
            • 34 Posts
            Quote from: lkfranklin at May 09, 2018, 02:16 PM
            I don't think the second screenshot is related to the issue (though I could be wrong). If you use the search icon at the top left of the MODX manager and search for south-america you should be able to find the resource(s) using that name/alias. You can either change the alias of the obsolete resource to free it up for you to use or go into system settings and make sure you have 'use_alias_path' switched on so that you can have multiple resources using the same alias, but with their own respective paths.

            As you can see from the 2nd screenshot resource 15 nowhere that I can find uses that alias south-america. How can I change it?
            Postscript: deleting the Snippet [resource 15] still doesn't free up the alias. [ed. note: julius nepos last edited this post 5 years, 11 months ago.]
              • 17301
              • 932 Posts
              Navigate to here
              /manager/?a=resource/update&id=15

              The snippet with id 15 relates to the snippet id not the resource id. Use the link above at the end of your domain to be taken to the resource with ID 15, which is the one using the alias currently.
                ■ email: [email protected] | ■ website: https://alienbuild.uk

                The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
                • 53414
                • 34 Posts
                Quote from: lkfranklin at May 09, 2018, 04:19 PM

                /manager/?a=resource/update&id=15

                The snippet with id 15 relates to the snippet id not the resource id. Use the link above at the end of your domain to be taken to the resource with ID 15, which is the one using the alias currently.
                Great it worked!

                Unfortunately I had previously deleted a completely innocent Snippet previously which had snippet id=15. I can now create the desired resource named ImageMap South America with the alias south-america. This can serve 3 functions I think.

                1) it will hold an html image map
                2) it'll be a top folder under which I can put other resources i.e. Argentina, Brazil, Chile, etc...
                3) I can use the Wayfinder thingy to point to it and it'll use the Resources (countries) listed under it to create a menu

                Is my understanding correct?
                  • 17301
                  • 932 Posts
                  Great smiley

                  Yeah that's correct. So if for example your south-america resource has an id of 77 then you can link to it directly from other pages using:

                  <a href="[[~77]]">Direct Link</a>


                  In pdoMenu you can create a menu just from this resource and its parents by setting the &parent property to 77, for example:

                  [[!pdoMenu? &parents=`77`]]


                  Or with pdoResources or getResources to retrieve a bunch of page properties such as creating a list of links:

                  [[pdoResources?
                      &parents=`77`
                      &depth=`0`
                      &tpl=`@INLINE <a href="[[~[[+id]]]]>[[+pagetitle]]</a>`
                  ]]

                    ■ email: [email protected] | ■ website: https://alienbuild.uk

                    The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
                    • 46886
                    • 1,154 Posts
                    Great! And please distinguish between resources (pages and other stuff), and templates, chunks and snippets, they are all different and all have ID numbers starting at 1. Resources are your pages, the other stuff is like...think of it as helper stuff. Either to make the pages look better, or do different things.

                    That poor, poor snippet #15, but it does mean the blogit extra will not work now, or probably not. But, if you were to uninstall the extra "blogit" and install again it would come back
                      • 17301
                      • 932 Posts
                      Or just recreate the snippet based on the code in the screenshot smiley


                      Snippet name = blogit.lexicon_load

                      <?php
                      $modx->lexicon->load('blogit:default');
                      return '';
                        ■ email: [email protected] | ■ website: https://alienbuild.uk

                        The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.