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

    I am currently in the process of developing a site for a client that is close to finalised, with the exception of the client’s need for CMS updating.

    A work in progress mockup can be found here: http://tomphilli.ps/felixthecat/07/index.html

    I wrote the html and css for this site but not the jquery, I have minimal java knowledge and I would say my coding is at an intermediate level.

    I’ve looked at a few options for simple cms implementation for sites that are built around html/css/js and ModX looks like it could be the right way to go. I’m a bit time poor at the moment so wondering if this will be a good solution to my problems?

    The needs of the client are pretty minimal:

    - text content on a few pages (no links being altered)
    - image upload at http://tomphilli.ps/felixthecat/07/whatson.html - the poster style image in the centre/righthand side of screen

    From reading a few posts it sounds as though ModX can have some issues with jscript clashes - there are some pretty weird jquery things happening in here which I know are not best practice - are these likely to present issues with ModX?

    I’m happy to spend a few hours reading and learning how to use the system, but I have no experience with cms of this style and hoping that this will not be time spent in the wrong direction. I would also consider paying someone for some code assistance depending on quotes.

    Any suggestions?

    Cheers smiley
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      At worst you might have to disable the QuickManager front-end editing feature, but I’ve never had to actually disable it since it can be configured to run its own jquery (or not) in no-conflict mode (or not). Usually when there’s a lot of jquery going on in the site, I just configure QM to not load jquery in the front-end at all; it’s quite happy to use either 1.3.2 or 1.4.2, as long as something else has already loaded it in the template head.
        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
        • 20288
        • 132 Posts
        I would think that MODx would be just fine - the jQuery code in the site is nothing out of the ordinary. BobRay has a great guide to port a design to a MODx template: http://bobsguides.com/porting-your-site-to-modx.html

        In most MODx sites, you would use Wayfinder to configure the navigation menu - but I’m not so sure you would need it, if the pages aren’t going to change.. you could just hard code the links in. (Not generally best practice, but Wayfinder seems a bit overkill in my opinion).

        So in MODx, there are things called "Template Variables" (http://wiki.modxcms.com/index.php/Template_Variable). They allow you to specify certain areas of your template to hold different things, and in this instance, it could hold text and images. So, when you port your template, you will have a template variable of [*content*], which will make a rich text editor where your content goes. On the page with the what’s on image, you’d place another TV, such as [*whats_on_img*], which will allow you to place an image in that spot. Be sure to read up about Template Access and TV Types as well.

        Good luck and write back if you need any help.
          • 31981
          • 26 Posts
          Thanks for the advice, I have now installed ModX and am trying to work my way through it.

          I am making headway in fits and starts, have just managed to get my css to apply to the page and now looking about for how to implement my jquerying in order for the images to be inserted into the background!

          Cheers,

          wassailant
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            The same way you would in a plain HTML page. MODx doesn’t care what’s in the template or the page content. Usually javascript requires a library to be linked to; do that in your template head. Then it requires a container (usually a <div>) with a certain classname or id. Put it in your template.

            If you need variations, use TVs and put the TV tags in your template.
              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
              • 31981
              • 26 Posts
              Hi Susan, thanks for checking back.

              I feel like I’m progressing quite well, I have implemented all the pages now and created hard coded links (poor practice I realise but the links were complicated to begin with due to some jquery hangover I couldn’t figure out), and the site is working fine in Chrome now, but not Firefox...

              Any idea what might be happening to cause that?

              http://tomphilli.ps/felixthecat/modx/

              Now to work on the ’what’s on’ image uploading, and to implement customisable content!

              I was writing this whilst you were writing yours, hence the quick reply.

              Cheers
                • 3749
                • 24,544 Posts
                It looks OK to me in FF -- maybe you fixed it? If not, it may be one of your FF add-ons.

                You should be able to code any link as:

                <a href="[[~##]]">Link text</a>


                Where ## is the ID of the page you’re linking to.
                  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
                  • 31981
                  • 26 Posts
                  I was working on linking them using that method but I saw this error message:

                  "page not found modx/[(site_url)]"

                  I think it’s due to the install of modx being in a different directory to the standard (tomphilli.ps/felixthecat/modx), but I can’t figure out how to compensate for it. I had to link my images using a longer, more specific series of foo/foo/ and I think it’s the same issue.
                    • 3749
                    • 24,544 Posts
                    Be sure you have this in your template:

                    <base href="[[!++site_url]]" />


                    If you have friendly URLs turned on, you need to rename ht.access to .htaccess and change the rewrite base if you’re in a subdirectory.
                      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