This article describes how to configure lemoon® CMS 4 for the lemoon® iPhone app.
- Start with downloading the Mindroute.Lemoon.Mobile assembly which is required for all web sites that you want to enable the iPhone app for.
Download the latest version here:
Mindroute.Lemoon.Mobile for version 1.1
Unzip the file to your web project \bin folder
- Now it's time to register a new routing in the Global.asax.cs located in the web site root folder.
Add the following code the the RegisterRoutes function:
//Custom routes
routes.MapRoute(
"CustomRoute", // Route name
"api/custom/{action}", // URL with parameters
new { controller = "custom" } // Parameter defaults
);
The RegisterRoutes function should now look like:
public static void RegisterRoutes(RouteCollection routes) {
routes.RouteExistingFiles = false;
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
//Custom routes
routes.MapRoute(
"CustomRoute", // Route name
"api/custom/{action}", // URL with parameters
new { controller = "custom" } // Parameter defaults
);
routes.AddLemoonRoutes();
}
- Re-build your web site in Visual Studio
- Now it's time to make some settings in the lemoon® CMS 4 admin interface. Login to /admin and go to Manage -> Plugins. There should now be a new plugin available called LemoonMobilePlugin. Click on the name and make sure you start by enabling it. Then go to the Settings tab and select a folder where uploaded images from the blog should be located. You can also set a maximum image size in pixels for uploaded images. Make sure this setting is suited for your web site design. The last setting let you choose if uploaded images should be places above or under the blog text.
- Save the plugin
- Now you're reday to start using the lemoon® iPhone app!