Main Content

Magnolia Community Forums: Get help with Magnolia: Pain-Free Theme Development?


  • bob-ziuchkovski
    bob-ziuchkovski
    Full name: Bob Ziuchkovski
    Posts: 1
    Last post: Apr 4, 2012 12:57:44 AM
    Registered on: Apr 1, 2012
    Pain-Free Theme Development?
    #1 by bob-ziuchkovski on Apr 4, 2012 12:57:44 AM

    Hi,

    I am working on a new magnolia project and am in the process of creating
    a custom theme. The project is making use of magnolia 4.5.1, soon to
    switch to 4.5.2.

    The problem I am having is with regard to workflow efficiency. My goal
    is make direct updates to the css and image content and test the changes
    immediately, without extra copy/upload steps.

    I am aware of the 'bypass' option and am already using it. However, the
    only way I have been able to get this to work is to run Tomcat with the
    'reloadable' option, which means every time I make a simple CSS tweak,
    Tomcat reloads everything in entirety and I have to log back into
    adminCentral.

    I have a feeling I must be missing something simple. Would someone who
    is using an efficient theming workflow be willing to share some tips?
    Note: I am aware the webdav module would probably help here, but it
    currently does not work with magnolia 4.5.x -- a JIRA is open for this
    issue already.

    I appreciate any/all advice. Thanks!

    Bob

  • will
    will
    Full name: Will Scheidegger
    Posts: 366
    Last post: Jul 29, 2014 10:53:13 AM
    Re: Pain-Free Theme Development?
    #2 by will on Apr 4, 2012 6:54:44 AM

    You are working locally I assume?

    There are some, who wrote custom Ant scripts which copy the resources to the web app each time they are saved. We chose to do it with symbolic links:
    For the template as well as for the theme folder we create symbolic links in the web apps "WEB-INF/classes/" folder which point to the corresponding folders in our project. In addition we have to configure Tomcat to follow symbolic links.

    Pro: Tomcat is always using the newest resources without the need of custom scripts etc.
    Con: When you redeploy the app you'll have to recreate the symbolic links.

    -will

  • ahietala
    ahietala
    Full name: Antti Hietala
    Posts: 274
    Last post: Jul 28, 2014 2:34:12 PM
    Re: Pain-Free Theme Development?
    #3 by ahietala on Apr 4, 2012 10:18:37 AM

    Hi Bob,

    Have you tried working with the static HTML prototype? It includes all STK page templates with various page layouts in standalone HTML files. No Tomcat or Magnolia CMS needed. Just HTML files, CSS and images on your local disk. Designers/graphic artists can work on layouts and themes independent of the development team even. If your site is based on STK pages and components, this is fast way to make theme changes.
    http://documentation.magnolia-cms.com/technical-guide/stk.html#StaticHTMLprototype

    Download the static HTML prototype from Nexus. Search for "magnolia-standard-templating-kit-prototype". The prototype is also included in the STK bundle ("magnolia-standard-templating-kit-bundle" in Nexus).
    http://nexus.magnolia-cms.com

    --Antti

  • runger
    runger
    Full name: Richard Unger
    Posts: 472
    Last post: Jul 29, 2014 1:04:34 PM
    Re: Pain-Free Theme Development?
    #4 by runger on Apr 5, 2012 3:00:08 PM

    Hi Bob,

    Efficient theme and template development was important to us.
    One of the key requirements for us when moving to the new CMS System (Magnolia) was to improve and simplify development. In the old system development was "code-heavy", the templating was weak, and tightly coupled to the code, and deployment was a nightmare - changing anything required a redeploy, and was error-prone and time-consuming.

    We looked at the possibilities, and decided on the following:

    1. We treat templates, dialogs, theme resources as "their own thing". In our point of view, they are not part of the (Java) code, and they are also not part of the content. They are considered "layout", its own category. This conceptual separation lets us develop our Java-Code one way while handling the templates and theming in a different way. It also makes for a nicer "separation of skills" - Java Developers can use eclipse, version control, deployment, etc... while templaters and designers just need a browser and a text-editor.

    2. We use inline-templating for templates and the resources/dms workspaces to store theme resources and images. (in Magnolia 4.5 the theme images can also live under resources).
    --> This means we never need to restart the server or do any messing around with deployment when we change themes or templates
    --> We use the XML-Import / Export or the Magnolia Packager Module (EE only) to move theme resources and templates between environments
    --> Another option could be (but we don't do this) using the activation mechanism to move this data between environments
    --> This makes us very fast and flexible when changing templates and themes. Often, when in meetings with our customers, we are able to make simple changes "live" during the meeting. This speed and flexibility has been greatly appreciated by our customer.
    --> We pay a price: our templates and theme resources are currently not version-controlled. We can't easily go back to a previous version of our templates. So far we have not missed having access to old versions, but we have missed the automatic merges and collision-warnings that come with source control. When we have conflicts (when moving templates from the different developers workstations to the qs system) we have to find and resolve them manually.

    3. We use webdav to make editing nice for developers.
    --> very important for the theme and template developers. They can simply open the freemarker, css or js files in their favourite text-editor. Works well once you find the right DAV client. Under Mac it works out of the box, under Windows it can be a pain to find a client. In Windows, we have had success with the products:
    - Webdrive
    - CrossFTP
    but neither is perfect.

    Regards from Vienna,

    Richard

    -----Ursprüngliche Nachricht-----
    Von: user-list-owner@magnolia-cms.com [mailto:user-list-owner@magnolia-cms.com] Im Auftrag von Bob Ziuchkovski
    Gesendet: Mittwoch, 04. April 2012 00:58
    An: user-list@magnolia-cms.com
    Betreff: [magnolia-user] Pain-Free Theme Development?

    Hi,

    I am working on a new magnolia project and am in the process of creating a custom theme. The project is making use of magnolia 4.5.1, soon to switch to 4.5.2.

    The problem I am having is with regard to workflow efficiency. My goal is make direct updates to the css and image content and test the changes immediately, without extra copy/upload steps.

    I am aware of the 'bypass' option and am already using it. However, the only way I have been able to get this to work is to run Tomcat with the 'reloadable' option, which means every time I make a simple CSS tweak, Tomcat reloads everything in entirety and I have to log back into adminCentral.

    I have a feeling I must be missing something simple. Would someone who is using an efficient theming workflow be willing to share some tips?
    Note: I am aware the webdav module would probably help here, but it currently does not work with magnolia 4.5.x -- a JIRA is open for this issue already.

    I appreciate any/all advice. Thanks!

    Bob

  • had
    had
    Full name: Jan Haderka
    Posts: 1,357
    Last post: May 22, 2014 2:48:23 PM
    Re: Pain-Free Theme Development?
    #5 by had on Apr 10, 2012 12:26:01 PM

    > --> We pay a price: our templates and theme resources are currently not version-controlled. We can't easily go back to a previous version of our templates. So far we have not missed having access to old versions, but we have missed the automatic merges and collision-warnings that come with source control. When we have conflicts (when moving templates from the different developers workstations to the qs system) we have to find and resolve them manually.

    It's still far away from what any decent VCS does, but you know you can modify save handler for templates and have it version content on save? This way you would get versions of it in the workspace in the very least. Alternatively you can also export them to FS or even send exported template to VCS.

    HTH,
    Jan

You don't have the permission to post on this thread

Sign in

To login on this forum, you can use your Magnolia Forge, Support or Partner account, or, below, your Google, Yahoo! or OpenID account. If you have trouble logging in, or any other sort of issue, please let us know in the Meta forum, on the user-list, or simply by email at forum-admin at magnolia-cms dot com.

* Required

... or sign in with:

  • icon http://{your-openid-url}
  • icon https://www.google.com/accounts/o8/id
  • icon https://me.yahoo.com/