ColdMVC Updates 1.3.7

10 views
Skip to first unread message

Tony Nelson

unread,
Jun 6, 2011, 10:44:33 PM6/6/11
to ColdMVC
I just committed some updates to the framework that people might be
interested in.

1. Thanks to inspiration from http://html5boilerplate.com/, the
ColdMVC head tag (<c:head />) will now output multiple <head> tags
wrapped in IE conditional comments, like such:

<!--[if lt IE 7]> <html class="no-js ie6" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--
>

2. Added the <c:charset /> tag that outputs: <meta charset="utf-8" />

3. Added the <c:viewport /> tag that outputs: <meta name="viewport"
content="width=device-width, initial-scale=1.0" />

4. Added isMobile() to the request helper and exposed it as both a
view helper and an action helper, courtesy of http://detectmobilebrowser.com/.

5. Updated the CGI scope helper facade so that you can modify the
values if you need to. This is done by copying the CGI scope into the
request scope when you first try to access it. For example, now when
you call $.cgi.get("request_method"), it will actually access
request.coldmvc.cgi.request_method rather than cgi.request_method
directly. This can be very useful if your app runs behind a proxy
server.

6. Added support for status text based error views. If your
application has an ErrorController, all errors are automatically
trapped during request dispatching and routed through the
ErrorController. ColdMVC will then attempt to render a status-specific
error view, first checking to see if a status code template exists ("/
views/error/404.cfm"), then check to see if a status text template
exists ("/views/error/not_found.cfm"), then a default error template
("/views/error/index.cfm"). I'll try to add some official
documentation for error handling to the reference guide sometime soon,
but for now hopefully this will suffice.

These changes were all included in version 1.3.7. Let me know if you
have any questions or comments.

Ryan Arneson

unread,
Jun 17, 2011, 4:20:01 PM6/17/11
to ColdMVC
I think you mean <c:html> not <c:head> in bullet point 1.

On Jun 6, 9:44 pm, Tony Nelson <tonynelso...@gmail.com> wrote:
> I just committed some updates to the framework that people might be
> interested in.
>
> 1. Thanks to inspiration fromhttp://html5boilerplate.com/, the
> ColdMVC head tag (<c:head />) will now output multiple <head> tags
> wrapped in IE conditional comments, like such:
>
>         <!--[if lt IE 7]> <html class="no-js ie6" lang="en"> <![endif]-->
>         <!--[if IE 7]> <html class="no-js ie7" lang="en"> <![endif]-->
>         <!--[if IE 8]> <html class="no-js ie8" lang="en"> <![endif]-->
>         <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--
>
>
>
> 2. Added the <c:charset /> tag that outputs: <meta charset="utf-8" />
>
> 3. Added the <c:viewport /> tag that outputs: <meta name="viewport"
> content="width=device-width, initial-scale=1.0" />
>
> 4. Added isMobile() to the request helper and exposed it as both a
> view helper and an action helper, courtesy ofhttp://detectmobilebrowser.com/.

Tony Nelson

unread,
Jun 17, 2011, 4:26:23 PM6/17/11
to col...@googlegroups.com
Good catch. <c:html> was updated, not <c:head>

https://github.com/tonynelson19/ColdMVC/blob/master/app/tags/html.cfm

-Tony

Dan Vega

unread,
Jun 17, 2011, 4:32:17 PM6/17/11
to col...@googlegroups.com
dumb question but why all the custom tags? 

do you really need  <c:charset /> to output a meta tag? 

Tony Nelson

unread,
Jun 17, 2011, 4:43:34 PM6/17/11
to ColdMVC
You definitely don't need to use the tags. They're just there to
provide convenience with sensible default values.

In the case of the charset tag, it doesn't provide a whole lot of
additional value, so it's really up to the developer if they want to
use it or not.

I added it to the framework after seeing what Zend had to offer for
view helpers and thought it made sense, especially since it's so
simple: http://framework.zend.com/manual/en/zend.view.helpers.html

In case you're curious, Mach-II also has a charset custom tag, so I'm
not totally crazy: http://trac.mach-ii.com/machii/wiki/HTMLHelperProperty#Usingthecharsetcustomtag

-Tony

On Jun 17, 3:32 pm, Dan Vega <danv...@gmail.com> wrote:
> dumb question but why all the custom tags?
>
> do you really need  <c:charset /> to output a meta tag?
>
> Thank You
> Dan Vega
> danv...@gmail.comhttp://www.danvega.org/
>
>
>
>
>
>
>
> On Fri, Jun 17, 2011 at 4:26 PM, Tony Nelson <tonynelso...@gmail.com> wrote:
> > Good catch. <c:html> was updated, not <c:head>
>
> >https://github.com/tonynelson19/ColdMVC/blob/master/app/tags/html.cfm
>
> > -Tony
>

Dan Vega

unread,
Jun 17, 2011, 4:47:01 PM6/17/11
to col...@googlegroups.com
I never said you were crazy... it just seemed silly but I got ya.. hopefully one of these days I can get caught up.

Thank You
Dan Vega
dan...@gmail.com
Reply all
Reply to author
Forward
0 new messages