We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37859
    • 34 Posts
    Hello,
    For the first time I'm using Revo. And this in combination with Bootstrap.
    I'm also using Newspublisher to let some users create new resources.
    Newspublisher is working fine, but I would like to have the Newspublisher form use the bootstrap css for forms so it looks like all the other forms on the website.
    As a Modx novice I have no clue how to do this.
    Anyone ever did this or have an example how to do this ?

    Thanks in advance for your help !
    Benny

    This question has been answered by donshakespeare. See the first response.

      • 42562
      • 1,145 Posts
      Hi,

      http://bobsguides.com/newspublisher-tutorial.html
      Altering the Form
      You can make many changes to the look of the form using CSS rules for styling. You can find the CSS form at assets/components/newspublisher/css/newspublisher.css. Using CSS, you can change the text color, background color, size, and/or position of any field, though the control of richtext fields is limited. You can put fields side-by-side by using "display:inline;" for the appropriate field(s). If you plan to make changes, it's recommended that you make a copy of the CSS file, the assets/components/newspublisher/css directory and put the name of your new file in the &cssfile property.
      If you feel you must, you can alter the Tpl chunks for any of the field types. Again, you should duplicate the existing chunk and put the name of your duplicate in the appropriate property. Be careful not to change the prefixes of any of the placeholders, even if you specify a custom prefix for the form as a property. The prefixes will be altered automatically by the snippet. Note that there are both np. and npx. prefixes. The npx. prefixes are used internally by the snippet, the np. prefixes are usually in the value field of the
        TinymceWrapper: Complete back/frontend content solution.
        Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
        5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
        • 37859
        • 34 Posts
        Thanks donshakespeare,
        But I already found that tutorial. Fact is that my Bootstrap css file is loaded in the head section, so it counts for the complete page.
        If I follow that tutorial from bobsguides, then the css file needs to be in the assets/components/newspublisher/css folder. So I have to load the bootstrap css file two times in that case, and that is just what I try to avoid.
          • 3749
          • 24,544 Posts
          If you add this to your NewsPublisher snippet tag, NP won't load any CSS file:

          &cssfile=`0`
            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
          • discuss.answer
            • 42562
            • 1,145 Posts
            Quote from: bendy4 at Jul 06, 2015, 05:13 PM
            Thanks donshakespeare,
            But I already found that tutorial. Fact is that my Bootstrap css file is loaded in the head section, so it counts for the complete page.
            If I follow that tutorial from bobsguides, then the css file needs to be in the assets/components/newspublisher/css folder. So I have to load the bootstrap css file two times in that case, and that is just what I try to avoid.
            Well, open the page with NewsPublisher, do &cssfile=`0` as already suggested; then get all the classes/ids of the elements NewsPublisher uses, and style them manually, toss the CSS in your website's bootstrap, group things so that these NP elements use existing styles.
              TinymceWrapper: Complete back/frontend content solution.
              Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
              5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.