We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!

Answered mxCalendar CSS

    • 10208 ☆ A M B ☆
    • 1,780 Posts
    Is there any way to specify a different css file entirely, in the call perhaps? Other than defining a new theme, that is. I'm having issues overriding the mxCalendar css in my main style css and would like to maintain the original file for updating purposes.

    This question has been answered by eric.swd. See the first response.

      Frogabog- MODX Websites in Portland Oregon
      "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
      Having server issues? These guys have MODX Hosting perfected - SkyToaster
    • discuss.answer
      • 39333
      • 151 Posts
      I don't think it will work like that because the component css file is linked after your main one, and there's no way to override that, at least that I know.

      Why don't you rename the default mxcalendar css to .ORG and copy it's contents to a new file the same name. Then edit as needed. If you need to divert back you have the original handy and unless you do a full removal of the component the renamed file will remain in the components directory.

      That's what I'd do, but maybe the developer can tell you where in the snippet to make a change to affect what you want.
        MODX...the Zen of CMS
        "Bight off more than you can chew and keep right on chewing."
        • 8274 ☆ A M B ☆
        • 222 Posts
        You can find the link to the mxcalendar css file on line 191 of mxcalendar snippet:
        $modx->regClientCSS($modx->getOption('mxcalendars.assets_url',null,$modx->getOption('assets_url').'components/mxcalendars/').'themes/'.$theme.'/css/mxcalendar.css');


        But, if you just wanted to push in a css file of overrides, maybe creating a simple snippet mxCalOverrides, and in it putting a call
        $modx->regClientCSS('path/name-of-your-css-file.css'); 
        return;


        Then drop a call to that snippet AFTER your mxCal call. I haven't attempted this, but it *should* put the link to the override file after the mxCal link in the HEAD. Not the most elegant solution, but since mxCalendar doesn't have any sort of pre/postHook settings...
          • 39333
          • 151 Posts
          MxCalendar could be "The Answer" to everyone's calendar woes in MODX.

          Does charless need some funding to work out the bugs and develop MxCalendar further?

          I'm happy to donate some cash if he has the time to make it what is should be, and I bet plenty of others would too. Can't donate the thousands he deserves but if enough ppl give a little it would mount to something worthwhile.

          Would love to hear http://modx.com/extras/author/charless input on the further development of this add-on and what it would take to build it to perfection.
            MODX...the Zen of CMS
            "Bight off more than you can chew and keep right on chewing."
            • 10208 ☆ A M B ☆
            • 1,780 Posts
            Quote from: eric.swd at Nov 13, 2012, 11:43 AM

            Why don't you rename the default mxcalendar css to .ORG and copy it's contents to a new file the same name. Then edit as needed. If you need to divert back you have the original handy and unless you do a full removal of the component the renamed file will remain in the components directory.

            Great minds... heh... That's what I did as a temporary measure. I'll just have to make sure I take a copy before I update mxCalendar.

            I might try the other suggestion too.

            Insofar as development, I'm going to take a leap and suggest that time may be a factor. Also, those of us who manage to figure things out might assist by adding to the documentation (as requested by Charles previously). The finicky behavior isn't something I can help with, but I have been mulling around the task of collecting as many goodies from the forums and other sources as I can find so the documentation can be updated.

            No one ever pays me for my sites, or I'd jump on the "pour money on it" idea in a heartbeat. I can however do documentation, just as soon as I actually understand how to make it work properly every time.
              Frogabog- MODX Websites in Portland Oregon
              "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
              Having server issues? These guys have MODX Hosting perfected - SkyToaster
              • 39333
              • 151 Posts
              Ya that sounds good I have some plans to do some more grass roots support when I can as well.

              Quote from: frogabog at Nov 13, 2012, 06:52 PM

              No one ever pays me for my sites, or I'd jump on the "pour money on it" idea in a heartbeat. I can however do documentation, just as soon as I actually understand how to make it work properly every time.

              I'm not a rich man either but was just thinking that if many pennies could be focused from the many users of MODX on some specific and potentially GREAT add-ons like MXC, developers like Charles would have a reason to free up time and we could all reap the benefits together. [ed. note: eric.swd last edited this post 13 years, 10 months ago.]
                MODX...the Zen of CMS
                "Bight off more than you can chew and keep right on chewing."