Ignore:
Timestamp:
May 19, 2011, 1:38:23 AM (13 years ago)
Author:
gav
Message:

Configure demo mode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/taglib/CustomTagLib.groovy

    r918 r932  
    174174//             def messageSource = grailsAttributes.getApplicationContext().getBean("messageSource")
    175175//             def locale = RCU.getLocale(request)
    176 // 
     176//
    177177//             title = messageSource.getMessage(titleKey, null, title, locale)
    178178//         }
     
    374374
    375375    /**
     376     * Returns the correct headerId for the main header div.
     377     */
     378    def headerId = { attrs, body ->
     379        def headerId = ''
     380        if(grails.util.Environment.isDevelopmentMode()) headerId = 'HeaderDev'
     381        else if(grailsApplication.config.demoMode.enabled) headerId = 'HeaderDemo'
     382        else headerId = 'Header'
     383        out << headerId
     384    }
     385
     386    /**
    376387    * Determine if a supplied string is considered a url or not.
    377388    * The scheme/protocol can be adjusted, file:// has been excluded here.
Note: See TracChangeset for help on using the changeset viewer.