Making BlogCFC mobile a bit more flexible

As you can tell from the URL I run BlogCFC from a sub-directory which has been fine for me until I tried to use the new mobile blogCFC by Dave Ferguson. This is when everything didn't go to plan as the mobile version assumes you run your blog from the root. After some investigating I think I have made it easier to drop in to most environments.

The instructions are references from the blogcfc root folder. First change:

  1. Go to /mobile/Application.cfm
  2. Change:
    <cfinclude template="/Application.cfm"> to
    <cfinclude template="../Application.cfm">

The second change is to simply stop create an object when we have a reference of it already.

  1. Go to /mobile/components/blogMobile.cfc
  2. Change:
    <cfset variables.utils = createObject("component", "org.camden.blog.utils")> to
    <cfset variables.utils = application.utils>

comments powered by Disqus