0

How to specifying doctype and bodyclass within HTMLFrameMojit

Hi,

How can I specifying the doctype and bodyclass within HTMLFrameMojit?
For instance: I'm trying to set up a webpage that uses yui3 modules. In order to look well, the bodyelement needs the yui3-skin-sam class. I can set this up by JS, but is seems to me it's better to place this code in application.json. I can't find it in the documentation...

Regards,
Marco

by
2 Replies
  • Unfortunately, currently the HTMLFrameMojit doesn't allow you to do add a class to the body element.

    What you can do is copy the HTMLFrameMojit that comes with Mojito source into your app's  'mojits' directory and then modify the views/index.hb.html, so that the body element has the class 'yui3-skin-sam'. HTMLFrameMojit is just another mojit (you could create your own frame mojit, too), so your local copy of HTMLFrameMojit will simply override the HTMLFrameMojit that comes with Mojito.

    The following instructions might speed things up for you:
     
    1. git clone https://github.com/yahoo/mojito.git
    2. cp -r mojito/lib/app/mojits/HTMLFrameMojit <your-app-dir>/mojits
    3. cd <your-app-dir>/mojits/HTMLFrameMojit/views
    4. Edit 'index.hb.html' so that the 'body' element has the class 'yui3-skin-sam'.
    5. Run your app. 
    0
  • All right,

    That will do. 

    Thx again,

    Regards,
    Marco.


    QUOTE(Me @ 27 Sep 2012 11:58 PM)
    Unfortunately, currently the HTMLFrameMojit doesn't allow you to do add a class to the body element.

    What you can do is copy the HTMLFrameMojit that comes with Mojito source into your app's  'mojits' directory and then modify the views/index.hb.html, so that the body element has the class 'yui3-skin-sam'. HTMLFrameMojit is just another mojit (you could create your own frame mojit, too), so your local copy of HTMLFrameMojit will simply override the HTMLFrameMojit that comes with Mojito.

    The following instructions might speed things up for you:
     
    1. git clone https://github.com/yahoo/mojito.git
    2. cp -r mojito/lib/app/mojits/HTMLFrameMojit <your-app-dir>/mojits
    3. cd <your-app-dir>/mojits/HTMLFrameMojit/views
    4. Edit 'index.hb.html' so that the 'body' element has the class 'yui3-skin-sam'.
    5. Run your app. 
    0

Recent Posts

in Yahoo! Mojito