What we're listening to:
Jared

The Album Leaf:
Into The Blue Again
Jeff

Paper Route:
Absence

Recently I’ve been evaluating refinerycms for a few client projects that it seemed suited for, and I really like that while it’s not always 100% what I want, it’s very easy to modify to get it to where I need it.

Here’s an example: My site needs a main nav to link offsite in a new window by adding target=”_blank” to the link, which is not handled out of the box by refinery.  So I copied vendor/refinery/app/views/shared/_menu_branch.html.erb into my theme directory to override the functionality and modified line 11 to the following:

<%= link_to menu_branch.title, menu_branch.url, \
:target => menu_branch.url.include?("http://") ? "_blank" : "" %>

Now any link containing http:// is automatically given a blank target. Presto.

  • http://www.paulsmithsale.uk.com/ paul smith uk

    abc123