contentbox.models.system

Class CBHelper

lucee.Component
    extended by contentbox.models.system.CBHelper

ContentBox - A Modular Content Platform Copyright since 2012 by Ortus Solutions, Corp www.ortussolutions.com/products/contentbox --- This is the ContentBox UI helper class that is injected by the CBRequest interceptor

Class Attributes:
  • threadsafe
  •  
  • singleton
  •  
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
    Property Summary
    type property default serializable required
    any authorService


    • access = public
    • returntype = any
    • inject = authorService@contentbox
    true false
    any categoryService


    • access = public
    • returntype = any
    • inject = categoryService@contentbox
    true false
    any cbResourceService


    • access = public
    • returntype = any
    • inject = resourceService@cbi18n
    true false
    any commentService


    • access = public
    • returntype = any
    • inject = commentService@contentbox
    true false
    any contentStoreService


    • access = public
    • returntype = any
    • inject = contentStoreService@contentbox
    true false
    any controller


    • access = public
    • returntype = any
    • inject = coldbox
    true false
    any entryService


    • access = public
    • returntype = any
    • inject = entryService@contentbox
    true false
    any markdown


    • access = public
    • returntype = any
    • inject = Processor@cbmarkdown
    true false
    any menuItemService


    • access = public
    • returntype = any
    • inject = menuItemService@contentbox
    true false
    any menuService


    • access = public
    • returntype = any
    • inject = menuService@contentbox
    true false
    any mobileDetector


    • access = public
    • returntype = any
    • inject = mobileDetector@contentbox
    true false
    any moduleService


    • access = public
    • returntype = any
    • inject = moduleService@contentbox
    true false
    any pageService


    • access = public
    • returntype = any
    • inject = pageService@contentbox
    true false
    any requestService


    • access = public
    • returntype = any
    • inject = coldbox:requestService
    true false
    any requestStorage


    • access = public
    • returntype = any
    • inject = requestStorage@cbstorages
    true false
    any securityService


    • access = public
    • returntype = any
    • inject = securityService@contentbox
    true false
    any settingService


    • access = public
    • returntype = any
    • inject = settingService@contentbox
    true false
    any siteService


    • access = public
    • returntype = any
    • inject = siteService@contentbox
    true false
    any themeService


    • access = public
    • returntype = any
    • inject = themeService@contentbox
    true false
    any widgetService


    • access = public
    • returntype = any
    • inject = widgetService@contentbox
    true false
    any wirebox


    • access = public
    • returntype = any
    • inject = wirebox
    true false
    Constructor Summary
    init()
          Constructor.
    Method Summary
    any adminRoot()
         Get the admin site root location using the configured module's entry point.
    any breadCrumbs([any page], [string separator='>'])
         Create breadcrumbs for a UI page.
    private any buildMenu([any pageRecords], [any excludes=''], [any type='ul'], [any typeClass='submenu'], [any separator=''], [boolean showNone='true'], [any levels='1'], [numeric currentLevel='1'], [any elementClass=''], [any parentClass='parent'], [any activeClass='active'], [any activeShowChildren='false'])
         PRIVATE ********************************************.
    any buildModuleLink(string module, string to, [any queryString=''], [boolean ssl='[runtime expression]'])
         Build out ContentBox module links.
    string buildProviderMenu(any<Menu> menu, array slugCache='[runtime expression]')
         Builds out a custom menu.
    private string buildProviderMenuLevel(array items, string listType='ul', array slugCache='[runtime expression]', [string listClass=''])
         Builds out a level of a custom menu.
    boolean categoryFilterExists()
    any checkMetaStruct()
         Check the Meta struct exists in the PRC.
    any contentStore(any slug, [any defaultValue=''], [string siteID='[runtime expression]'])
         Get a published content store and return its latest active content.
    any contentStoreObject(any slug, [string siteID='[runtime expression]'])
         Get a content store object by slug.
    any event(any state, [struct data='[runtime expression]'])
         events ********************************************.
    string getAuthorService()
    any getBlogEntryPoint()
         Get the blog entry point as specified in the global settings.
    any getCategoryFilter()
    string getCategoryService()
    string getCbResourceService()
    array getCommentErrors()
         Get comment errors array, usually when the form elements did not validate.
    string getCommentService()
    any getContentBoxCodeName()
         The ContentBox Codename.
    any getContentBoxCodeNameURL()
         The ContentBox codename Uri.
    any getContentBoxVersion()
         The ContentBox version.
    any getContentDescription()
         Get the current content metadata description according to SEO discovery rules.
    any getContentImageURL()
         Get the Content Image URL based on content type.
    any getContentKeywords()
         Get the current content metadata keywords according to SEO discovery rules.
    any getContentOGType()
         Get the Content Open Graph Type based on content type.
    string getContentStoreService()
    any getContentTitle()
         Get the current content metadata title according to SEO Discovery Rules.
    any getContentURL()
         Get the Canonical URL based on content type.
    string getController()
    any getCurrentCategories([any isPublic='true'])
         Get the current array of public category entities for the current site.
    any getCurrentComments()
         Get the viewed page's or entry's comments, else throw exception.
    numeric getCurrentCommentsCount()
         Get the viewed entry's comments count, else throw exception.
    struct getCurrentCustomFields()
         Get the current page's or blog entries custom fields as a struct.
    any getCurrentEntries()
         Get the index page entries, else throws exception.
    numeric getCurrentEntriesCount()
         Get the index page entries count, else throws exception.
    any getCurrentEntry()
         Get the viewed entry if in entry view, else throws exception.
    any getCurrentPage()
         Get the viewed page if in page view, else throws exception.
    any getCurrentRelatedContent()
         Get the current page or entries related content array.
    any getCustomField(any key, [any defaultValue])
         Get a current page's or blog entrie's custom field by key, you can pass a default value if not found.
    any getDayFilter()
    string getEntryService()
    any getFlash()
         Return the current system flash scope.
    any getHomePage([string siteID=''])
         Get the current working site's homepage.
    any getMaintenanceMessage()
         Get the maintenance message from the ContentBox settings in rendering condition.
    string getMarkdown()
    string getMenuItemService()
    string getMenuService()
    any getMetaDescription()
         Get the Meta description for the request.
    any getMetaImageURL()
         Get the Meta ImageURL for the request.
    any getMetaKeywords()
         Get the Meta keywords for the request.
    any getMetaOGType()
         Get the Meta OGType for the request.
    any getMetaTitle()
         Get the Meta Title for the request.
    any getMetaURL()
         Get the Meta Canonical URL for the request.
    any getMissingPage()
         Get the missing page, if any, usually used in a page not found context.
    string getMobileDetector()
    struct getModuleConfig(any module)
         Get a module's configuration structure.
    string getModuleService()
    struct getModuleSettings(any module)
         Get a module's settings structure.
    any getMonthFilter()
    any getOpenGraphMeta()
         getOpenGraphMeta - return Open Graph Facebook friendly meta data.
    string getPageService()
    struct getPrivateRequestCollection()
         Get the private request collection.
    struct getRequestCollection([boolean private='false'])
         Get the RC or PRC collection reference.
    any getRequestContext()
         Get the current ColdBox request context.
    string getRequestService()
    string getRequestStorage()
    any getSearchResults()
         Get the curent search results object.
    any getSearchResultsContent()
         get the curent search results HTML content.
    any getSearchTerm()
         Get Search Term used.
    string getSecurityService()
    string getSettingService()
    string getSiteService()
    string getThemeService()
    any getWidget(any name)
         Return a widget object according to name convention:.
    string getWidgetService()
    string getWirebox()
    any getYearFilter()
    any isAdminLoaded()
         Verifies if the admin module is loaded.
    boolean isArchivesView()
    boolean isBlogView()
    boolean isCommentFormError()
         Determines if a comment form error has ocurred.
    boolean isCommentsEnabled([any content])
         Determines if site comments are enabled and if the entry accepts comments.
    boolean isEntryView()
    boolean isHomePage()
         Checks if the currently viewed page is the homepage.
    boolean isIndexView()
    boolean isMobile()
         Detects if the incoming request is from a mobile device or NOT.
    boolean isPageView([any page=''])
         Determine if you are in the page view.
    boolean isPreview()
         Determine if you're in a "preview" mode or not.
    boolean isPrintFormat()
         Determine if you are in printing or exporting format.
    boolean isSearchView()
         search ********************************************.
    any linkAdmin([any event=''], [boolean ssl='[runtime expression]'])
         Link to the admin.
    any linkAdminLogin([boolean ssl='[runtime expression]'])
         Link to the admin login.
    any linkAdminLogout([boolean ssl='[runtime expression]'])
         Link to the admin logout.
    any linkArchive([any year], [any month], [any day], [boolean ssl='[runtime expression]'])
         Link to a specific filtered archive of entries.
    any linkBlog([string siteID=''])
         Create a link to your site blog.
    any linkCategory(any category, [boolean ssl='[runtime expression]'])
         Link to a specific filtered category view of blog entries.
    any linkCategoryWithSlug(string categorySlug, [boolean ssl='[runtime expression]'])
         Link to a specific filtered category view of blog entries.
    any linkComment(any comment, [boolean ssl='[runtime expression]'])
         Create a link to a specific comment in a page or in an entry.
    any linkCommentPost(any content, [boolean ssl='[runtime expression]'])
         Link to the commenting post action, this is where comments are submitted to.
    any linkComments(any content, [boolean ssl='[runtime expression]'])
         Create a link to an entry's or page's comments section.
    any linkContent(any content, [boolean ssl='[runtime expression]'], [any format='html'])
         Link to a specific content object.
    any linkContentSearch([boolean ssl='[runtime expression]'])
         Link to the content search route.
    any linkContentSubscription([boolean ssl='[runtime expression]'])
         Link to the content subscription route.
    any linkContentUnsubscribe(string token, [boolean ssl='[runtime expression]'])
         Link to the ContentBox Content Subscription unsubscribe URL.
    any linkEntry(any entry, [boolean ssl='[runtime expression]'], [any format='html'])
         Link to a specific blog entry's page.
    any linkEntryWithSlug(any slug, [boolean ssl='[runtime expression]'], [any format='html'])
         Link to a specific entry's page using a slug only.
    any linkHome([string siteID=''])
         Create a link to your site homepage.
    any linkLanguageChange([string lang='en_US'])
         Link to the __changeLang route, this is where the fwLocale is changed.
    any linkPage(any page, [boolean ssl='[runtime expression]'], [any format='html'])
         Link to a specific page.
    any linkPageRSS([any category], [boolean comments='false'], [any page], [boolean ssl='[runtime expression]'])
         Link to the ContentBox Page RSS Feeds.
    any linkPageWithSlug(any slug, [boolean ssl='[runtime expression]'], [any format='html'])
         Link to a specific page using a slug only.
    any linkRSS([any category], [any comments='false'], [any entry], [boolean ssl='[runtime expression]'])
         Link to RSS feeds that ContentBox generates, by default it is the recent updates feed.
    any linkSearch([boolean ssl='[runtime expression]'])
         Link to the search route for this blog.
    any linkSelf()
         Create a link to the current page/entry you are on.
    any linkSiteRSS([any category], [boolean comments='false'], [string slug], [boolean ssl='[runtime expression]'])
         Link to the ContentBox Site RSS Feeds.
    any linkToParentPage([any page], [any text=''])
         Create an href to a page's parent.
    any mainView([struct args='[runtime expression]'])
         Render the incoming event's main view, basically a proxy to ColdBox's controller.
    any menu(string slug, any type='html', array slugCache='[runtime expression]')
         Build out a menu from the defined menus in ContentBox.
    any moduleRelocate(string module, string event, [string URL], [string URI], [string queryString=''], [any persist], [struct persistStruct], [boolean ssl], [any baseURL], [boolean postProcessExempt], [numeric statusCode])
         Relocate to a ContentBox module event.
    CBHelper prepareUIRequest([string layout], [string title], [string description], [string keywords])
         Prepare a ContentBox UI request.
    string quickAvatar(any author, [numeric size='25'], [string class='gravatar'])
         Renders out an author's avatar.
    any quickCategories([string template='category'], [string collectionAs='category'], [struct args='[runtime expression]'], [any isPublic='true'])
         Render out categories anywhere using ColdBox collection rendering.
    any quickCategoryLinks(any entry)
         quick HTML ********************************************.
    any quickCommentForm(any content)
         quickCommentForm will build a standard ContentBox Comment Form according to the CommentForm widget.
    any quickComments([string template='comment'], [string collectionAs='comment'], [struct args='[runtime expression]'])
         Render out comments anywhere using ColdBox collection rendering.
    any quickCustomFields()
         Render out custom fields for the current content.
    any quickEntries([string template='entry'], [string collectionAs='entry'], [struct args='[runtime expression]'])
         Render out entries in the home page by using our ColdBox collection rendering.
    any quickEntry([string template='entry'], [string collectionAs='entry'], [struct args='[runtime expression]'])
         Render out an entry using your pre-defined 'entry' template.
    any quickLayout(any layout, [any view=''], [any module='[runtime expression]'], [any args='[runtime expression]'], [any viewModule=''], [boolean prePostExempt='false'])
         QuickLayout is a proxy to ColdBox's renderLayout method with the addition of prefixing the location of the layout according to the.
    any quickPaging()
         Render out paging for blog entries only.
    any quickRelatedContent([string template='relatedContent'], [string collectionAs='relatedContent'], [struct args='[runtime expression]'])
         Render out related content anywhere using ColdBox collection rendering.
    any quickSearchForm()
         quickSearchForm will build a standard ContentBox Content Search Form according to the SearchForm widget.
    any quickSearchPaging()
         Render out paging for search content.
    any quickView(any view, [any cache='false'], [any cacheTimeout], [any cacheLastAccessTimeout], [any cacheSuffix], [any cacheProvider='template'], [any module='contentbox'], [struct args], [any collection], [any collectionAs=''], [numeric collectionStartRow='1'], [numeric collectionMaxRows='0'], [any collectionDelim=''], [boolean prepostExempt='false'])
         QuickView is a proxy to ColdBox's view method with the addition of prefixing the location of the view according to the.
    any r(string resource, [string defaultValue], [string locale], [any values], [string bundle])
         Retrieve i18n resources.
    any rootMenu([any excludes=''], [any type='ul'], [any typeClass=''], [any separator=''], [any levels='1'], [any elementClass=''], [any parentClass='parent'], [any activeClass='active'])
         Render out a quick menu for root level pages.
    boolean searchTermExists()
         Determine if you have a search term.
    private any sep()
         Get the site URL separator depending if you have an entry point or not.
    any setAuthorService(any authorService)
    any setCategoryService(any categoryService)
    any setCbResourceService(any cbResourceService)
    any setCommentService(any commentService)
    any setContentStoreService(any contentStoreService)
    any setController(any controller)
    any setEntryService(any entryService)
    any setMarkdown(any markdown)
    any setMenuItemService(any menuItemService)
    any setMenuService(any menuService)
    any setMetaDescription(string description)
         Set the Meta Description for the request.
    any setMetaImageURL(string imageURL)
         Set the Meta ImageURL for the request.
    any setMetaKeywords(string keywords)
         Set the Meta Keywords for the request.
    any setMetaOGType(string OGType)
         Set the Meta OGType for the request.
    any setMetaTitle(string title)
         Set the Meta Title for the request.
    any setMetaURL(string url)
         Set the Meta Canonical URL for the request.
    any setMobileDetector(any mobileDetector)
    any setModuleService(any moduleService)
    any setNextModuleEvent(string module, string event, [string URL], [string URI], [string queryString=''], [any persist], [struct persistStruct], [boolean ssl], [any baseURL], [boolean postProcessExempt], [numeric statusCode])
    any setPageService(any pageService)
    any setRequestService(any requestService)
    any setRequestStorage(any requestStorage)
    any setSecurityService(any securityService)
    any setSettingService(any settingService)
    any setSiteService(any siteService)
    any setThemeService(any themeService)
    any setWidgetService(any widgetService)
    any setWirebox(any wirebox)
    any setting(any key, [any defaultValue])
         Get a global setting value by key or by default value.
    any site([string siteID=''])
         Get the current site object that you are visiting the UI from via our discovery methods.
    any siteBaseURL([string siteID=''])
         Get the HTML base URL that is used for the HTML tag.
    any siteDescription()
         Retrieve the site description.
    any siteEmail()
         Retrieve the site administrator email.
    any siteKeywords()
         Retrieve the site keywords.
    any siteName()
         Retrieve the site name.
    any siteOutgoingEmail()
         Retrieve the site outgoing email.
    any siteRoot([string siteID=''])
         Get the site root location using your configured module's entry point and the discovered site.
    any siteSetting(any key, [any defaultValue])
         Get a site setting value by key or by default value.
    any siteTagLine()
         Retrieve the site tagline.
    any stripHTML(any stringTarget)
         utility to strip HTML.
    any stripWhitespace(any stringTarget)
         removes CR LF TAB double spaces from string.
    any subPageMenu([any page], [any excludes=''], [any type='ul'], [any typeClass=''], [any separator=''], [boolean showNone='true'], [any levels='1'], [any elementClass=''], [any parentClass='parent'], [any activeClass='active'], [any activeShowChildren='false'])
         Create a sub page menu for a given page or current page.
    any themeName()
         Get the name of the current set and active theme.
    any themeRecord()
         Get the theme record of the current set and active theme.
    any themeRoot()
         Get the location of your currently defined theme in the application, great for assets, cfincludes, etc.
    any themeSetting(any key, [any defaultValue])
         Get a theme setting.
    any widget(any name, [struct args='[runtime expression]'])
         Execute a widget's renderit method.
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init()

    Constructor


    Property Detail

    authorService

    property any authorService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - authorService@contentbox
    serializable - true

    categoryService

    property any categoryService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - categoryService@contentbox
    serializable - true

    cbResourceService

    property any cbResourceService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - resourceService@cbi18n
    serializable - true

    commentService

    property any commentService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - commentService@contentbox
    serializable - true

    contentStoreService

    property any contentStoreService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - contentStoreService@contentbox
    serializable - true

    controller

    property any controller

    Attributes:
    access - public
    required - false
    returntype - any
    inject - coldbox
    serializable - true

    entryService

    property any entryService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - entryService@contentbox
    serializable - true

    markdown

    property any markdown

    Attributes:
    access - public
    required - false
    returntype - any
    inject - Processor@cbmarkdown
    serializable - true

    menuItemService

    property any menuItemService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - menuItemService@contentbox
    serializable - true

    menuService

    property any menuService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - menuService@contentbox
    serializable - true

    mobileDetector

    property any mobileDetector

    Attributes:
    access - public
    required - false
    returntype - any
    inject - mobileDetector@contentbox
    serializable - true

    moduleService

    property any moduleService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - moduleService@contentbox
    serializable - true

    pageService

    property any pageService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - pageService@contentbox
    serializable - true

    requestService

    property any requestService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - coldbox:requestService
    serializable - true

    requestStorage

    property any requestStorage

    Attributes:
    access - public
    required - false
    returntype - any
    inject - requestStorage@cbstorages
    serializable - true

    securityService

    property any securityService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - securityService@contentbox
    serializable - true

    settingService

    property any settingService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - settingService@contentbox
    serializable - true

    siteService

    property any siteService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - siteService@contentbox
    serializable - true

    themeService

    property any themeService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - themeService@contentbox
    serializable - true

    widgetService

    property any widgetService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - widgetService@contentbox
    serializable - true

    wirebox

    property any wirebox

    Attributes:
    access - public
    required - false
    returntype - any
    inject - wirebox
    serializable - true

    Method Detail

    adminRoot

    public any adminRoot()

    Get the admin site root location using the configured module's entry point


    breadCrumbs

    public any breadCrumbs([any page], [string separator='>'])

    Create breadcrumbs for a UI page

    Parameters:
    page - Optional page to create link for, else look for current page
    separator - Breadcrumb separator, defaults to '>'

    buildMenu

    private any buildMenu([any pageRecords], [any excludes=''], [any type='ul'], [any typeClass='submenu'], [any separator=''], [boolean showNone='true'], [any levels='1'], [numeric currentLevel='1'], [any elementClass=''], [any parentClass='parent'], [any activeClass='active'], [any activeShowChildren='false'])

    PRIVATE ********************************************

    Parameters:
    pageRecords
    excludes
    type
    typeClass
    separator
    showNone
    levels
    currentLevel
    elementClass
    parentClass
    activeClass
    activeShowChildren

    buildModuleLink

    public any buildModuleLink(string module, string to, [any queryString=''], [boolean ssl='[runtime expression]'])

    Build out ContentBox module links

    Parameters:
    module - The module to link this URL to
    to - The handler action combination to link to
    queryString - The query string to append in SES format
    ssl - Create the link in SSL or not

    buildProviderMenu

    public string buildProviderMenu(any<Menu> menu, array slugCache='[runtime expression]')

    Builds out a custom menu

    Parameters:
    menu - The root menu object that should be rendered
    slugCache - The cache of menu slugs already used in this request

    buildProviderMenuLevel

    private string buildProviderMenuLevel(array items, string listType='ul', array slugCache='[runtime expression]', [string listClass=''])

    Builds out a level of a custom menu

    Parameters:
    items - An array of menu items for this level
    listType - The type of list to create (derived from owning menu)
    slugCache - The cache of menu slugs already used in this request
    listClass

    categoryFilterExists

    public boolean categoryFilterExists()


    checkMetaStruct

    public any checkMetaStruct()

    Check the Meta struct exists in the PRC


    contentStore

    public any contentStore(any slug, [any defaultValue=''], [string siteID='[runtime expression]'])

    Get a published content store and return its latest active content

    Parameters:
    slug - The content slug to retrieve
    defaultValue - The default value to use if the content element not found.
    siteID - The site to get it from, defaults to current site

    contentStoreObject

    public any contentStoreObject(any slug, [string siteID='[runtime expression]'])

    Get a content store object by slug

    Parameters:
    slug - The content slug to retrieve
    siteID
    Returns:
    The content object or a new empty content object

    event

    public any event(any state, [struct data='[runtime expression]'])

    events ********************************************

    Parameters:
    state
    data

    getAuthorService

    public string getAuthorService()


    getBlogEntryPoint

    public any getBlogEntryPoint()

    Get the blog entry point as specified in the global settings


    getCategoryFilter

    public any getCategoryFilter()


    getCategoryService

    public string getCategoryService()


    getCbResourceService

    public string getCbResourceService()


    getCommentErrors

    public array getCommentErrors()

    Get comment errors array, usually when the form elements did not validate

    Returns:
    The errors array or an empty array

    getCommentService

    public string getCommentService()


    getContentBoxCodeName

    public any getContentBoxCodeName()

    The ContentBox Codename


    getContentBoxCodeNameURL

    public any getContentBoxCodeNameURL()

    The ContentBox codename Uri


    getContentBoxVersion

    public any getContentBoxVersion()

    The ContentBox version


    getContentDescription

    public any getContentDescription()

    Get the current content metadata description according to SEO discovery rules


    getContentImageURL

    public any getContentImageURL()

    Get the Content Image URL based on content type


    getContentKeywords

    public any getContentKeywords()

    Get the current content metadata keywords according to SEO discovery rules


    getContentOGType

    public any getContentOGType()

    Get the Content Open Graph Type based on content type


    getContentStoreService

    public string getContentStoreService()


    getContentTitle

    public any getContentTitle()

    Get the current content metadata title according to SEO Discovery Rules


    getContentURL

    public any getContentURL()

    Get the Canonical URL based on content type


    getController

    public string getController()


    getCurrentCategories

    public any getCurrentCategories([any isPublic='true'])

    Get the current array of public category entities for the current site

    Parameters:
    isPublic - By default return all public categories. If false, return private categories, If null, all categories
    Returns:
    array of category

    getCurrentComments

    public any getCurrentComments()

    Get the viewed page's or entry's comments, else throw exception

    Returns:
    array of comments
    Throws:
    ContentBox.CBHelper.InvalidCommentContext

    getCurrentCommentsCount

    public numeric getCurrentCommentsCount()

    Get the viewed entry's comments count, else throw exception

    Throws:
    ContentBox.CBHelper.InvalidCommentContext

    getCurrentCustomFields

    public struct getCurrentCustomFields()

    Get the current page's or blog entries custom fields as a struct


    getCurrentEntries

    public any getCurrentEntries()

    Get the index page entries, else throws exception

    Returns:
    array of entries
    Throws:
    ContentBox.CBHelper.InvalidEntriesContext

    getCurrentEntriesCount

    public numeric getCurrentEntriesCount()

    Get the index page entries count, else throws exception

    Throws:
    ContentBox.CBHelper.InvalidEntriesContext

    getCurrentEntry

    public any getCurrentEntry()

    Get the viewed entry if in entry view, else throws exception

    Returns:
    Entry
    Throws:
    ContentBox.CBHelper.InvalidEntryContext

    getCurrentPage

    public any getCurrentPage()

    Get the viewed page if in page view, else throws exception

    Returns:
    Page
    Throws:
    ContentBox.CBHelper.InvalidPageContext

    getCurrentRelatedContent

    public any getCurrentRelatedContent()

    Get the current page or entries related content array

    Returns:
    array

    getCustomField

    public any getCustomField(any key, [any defaultValue])

    Get a current page's or blog entrie's custom field by key, you can pass a default value if not found

    Parameters:
    key - The custom field key
    defaultValue - The default value to return if not found

    getDayFilter

    public any getDayFilter()


    getEntryService

    public string getEntryService()


    getFlash

    public any getFlash()

    Return the current system flash scope


    getHomePage

    public any getHomePage([string siteID=''])

    Get the current working site's homepage

    Parameters:
    siteID - The site id to get it from

    getMaintenanceMessage

    public any getMaintenanceMessage()

    Get the maintenance message from the ContentBox settings in rendering condition.


    getMarkdown

    public string getMarkdown()


    getMenuItemService

    public string getMenuItemService()


    getMenuService

    public string getMenuService()


    getMetaDescription

    public any getMetaDescription()

    Get the Meta description for the request


    getMetaImageURL

    public any getMetaImageURL()

    Get the Meta ImageURL for the request


    getMetaKeywords

    public any getMetaKeywords()

    Get the Meta keywords for the request


    getMetaOGType

    public any getMetaOGType()

    Get the Meta OGType for the request


    getMetaTitle

    public any getMetaTitle()

    Get the Meta Title for the request


    getMetaURL

    public any getMetaURL()

    Get the Meta Canonical URL for the request


    getMissingPage

    public any getMissingPage()

    Get the missing page, if any, usually used in a page not found context


    getMobileDetector

    public string getMobileDetector()


    getModuleConfig

    public struct getModuleConfig(any module)

    Get a module's configuration structure

    Parameters:
    module - The module to retrieve the configuration structure from

    getModuleService

    public string getModuleService()


    getModuleSettings

    public struct getModuleSettings(any module)

    Get a module's settings structure

    Parameters:
    module - The module to retrieve the configuration settings from

    getMonthFilter

    public any getMonthFilter()


    getOpenGraphMeta

    public any getOpenGraphMeta()

    getOpenGraphMeta - return Open Graph Facebook friendly meta data More information: https://developers.facebook.com/docs/reference/opengraph Best Practices: https://developers.facebook.com/docs/sharing/best-practices


    getPageService

    public string getPageService()


    getPrivateRequestCollection

    public struct getPrivateRequestCollection()

    Get the private request collection


    getRequestCollection

    public struct getRequestCollection([boolean private='false'])

    Get the RC or PRC collection reference

    Parameters:
    private - The boolean bit that says give me the RC by default or true for the private collection (PRC)

    getRequestContext

    public any getRequestContext()

    Get the current ColdBox request context

    Returns:
    coldbox.system.web.context.RequestContext

    getRequestService

    public string getRequestService()


    getRequestStorage

    public string getRequestStorage()


    getSearchResults

    public any getSearchResults()

    Get the curent search results object

    Returns:
    contentbox.models.search.SearchResults

    getSearchResultsContent

    public any getSearchResultsContent()

    get the curent search results HTML content


    getSearchTerm

    public any getSearchTerm()

    Get Search Term used


    getSecurityService

    public string getSecurityService()


    getSettingService

    public string getSettingService()


    getSiteService

    public string getSiteService()


    getThemeService

    public string getThemeService()


    getWidget

    public any getWidget(any name)

    Return a widget object according to name convention: - ~name = Active Theme Widget - name@module = Module Widget - module = Custom or Core Widget

    Parameters:
    name - The name of the installed widget to return

    getWidgetService

    public string getWidgetService()


    getWirebox

    public string getWirebox()


    getYearFilter

    public any getYearFilter()


    isAdminLoaded

    public any isAdminLoaded()

    Verifies if the admin module is loaded


    isArchivesView

    public boolean isArchivesView()


    isBlogView

    public boolean isBlogView()


    isCommentFormError

    public boolean isCommentFormError()

    Determines if a comment form error has ocurred


    isCommentsEnabled

    public boolean isCommentsEnabled([any content])

    Determines if site comments are enabled and if the entry accepts comments

    Parameters:
    content - The entry or page content to validate comments also with

    isEntryView

    public boolean isEntryView()


    isHomePage

    public boolean isHomePage()

    Checks if the currently viewed page is the homepage.


    isIndexView

    public boolean isIndexView()


    isMobile

    public boolean isMobile()

    Detects if the incoming request is from a mobile device or NOT.


    isPageView

    public boolean isPageView([any page=''])

    Determine if you are in the page view

    Parameters:
    page - Optional page slug to determine if you are in that page or not.

    isPreview

    public boolean isPreview()

    Determine if you're in a "preview" mode or not


    isPrintFormat

    public boolean isPrintFormat()

    Determine if you are in printing or exporting format


    isSearchView

    public boolean isSearchView()

    search ********************************************


    linkAdmin

    public any linkAdmin([any event=''], [boolean ssl='[runtime expression]'])

    Link to the admin

    Parameters:
    event - An optional event to link to
    ssl - Use SSL or not, defaults to event context.

    linkAdminLogin

    public any linkAdminLogin([boolean ssl='[runtime expression]'])

    Link to the admin login

    Parameters:
    ssl - Use SSL or not, defaults to event context.

    linkAdminLogout

    public any linkAdminLogout([boolean ssl='[runtime expression]'])

    Link to the admin logout

    Parameters:
    ssl - Use SSL or not, defaults to event context.

    linkArchive

    public any linkArchive([any year], [any month], [any day], [boolean ssl='[runtime expression]'])

    Link to a specific filtered archive of entries

    Parameters:
    year - The year of the archive
    month - The month of the archive
    day - The day of the archive
    ssl - Use SSL or not, defaults to false.

    linkBlog

    public any linkBlog([string siteID=''])

    Create a link to your site blog

    Parameters:
    siteID - The site id to link to or use the default

    linkCategory

    public any linkCategory(any category, [boolean ssl='[runtime expression]'])

    Link to a specific filtered category view of blog entries

    Parameters:
    category - The category object or slug to link to
    ssl - Use SSL or not, defaults to false.

    linkCategoryWithSlug

    public any linkCategoryWithSlug(string categorySlug, [boolean ssl='[runtime expression]'])

    Link to a specific filtered category view of blog entries

    Parameters:
    categorySlug - The category slug as a string to link to
    ssl - Use SSL or not, defaults to false.

    linkComment

    public any linkComment(any comment, [boolean ssl='[runtime expression]'])

    Create a link to a specific comment in a page or in an entry

    Parameters:
    comment - The comment to link to
    ssl - Use SSL or not, defaults to false.

    linkCommentPost

    public any linkCommentPost(any content, [boolean ssl='[runtime expression]'])

    Link to the commenting post action, this is where comments are submitted to

    Parameters:
    content - The entry or page to link to its comments
    ssl - Use SSL or not, defaults to false.
    Returns:
    The URL to submit to.

    linkComments

    public any linkComments(any content, [boolean ssl='[runtime expression]'])

    Create a link to an entry's or page's comments section

    Parameters:
    content - The entry or page to link to its comments
    ssl - Use SSL or not, defaults to false.

    linkContent

    public any linkContent(any content, [boolean ssl='[runtime expression]'], [any format='html'])

    Link to a specific content object

    Parameters:
    content - The content object to link to
    ssl - Use SSL or not, defaults to false.
    format - The format output of the content default is HTML but you can pass pdf,print or doc.

    linkContentSearch

    public any linkContentSearch([boolean ssl='[runtime expression]'])

    Link to the content search route

    Parameters:
    ssl - Use SSL or not, defaults to false.

    linkContentSubscription

    public any linkContentSubscription([boolean ssl='[runtime expression]'])

    Link to the content subscription route

    Parameters:
    ssl - Use SSL or not, defaults to false.

    linkContentUnsubscribe

    public any linkContentUnsubscribe(string token, [boolean ssl='[runtime expression]'])

    Link to the ContentBox Content Subscription unsubscribe URL

    Parameters:
    token - The token to use for unsubscribing
    ssl

    linkEntry

    public any linkEntry(any entry, [boolean ssl='[runtime expression]'], [any format='html'])

    Link to a specific blog entry's page

    Parameters:
    entry - The entry to link to
    ssl - Use SSL or not, defaults to false.
    format - The format output of the content default is HTML bu you can pass pdf,print or doc.

    linkEntryWithSlug

    public any linkEntryWithSlug(any slug, [boolean ssl='[runtime expression]'], [any format='html'])

    Link to a specific entry's page using a slug only

    Parameters:
    slug - The entry slug to link to
    ssl - Use SSL or not, defaults to false.
    format - The format output of the content default is HTML bu you can pass pdf,print or doc.

    linkHome

    public any linkHome([string siteID=''])

    Create a link to your site homepage

    Parameters:
    siteID - The site id to link to or use the default

    linkLanguageChange

    public any linkLanguageChange([string lang='en_US'])

    Link to the __changeLang route, this is where the fwLocale is changed

    Parameters:
    lang - The iso language code

    linkPage

    public any linkPage(any page, [boolean ssl='[runtime expression]'], [any format='html'])

    Link to a specific page

    Parameters:
    page - The page to link to. This can be a simple value or a page object
    ssl - Use SSL or not, defaults to false.
    format - The format extension output of the content default is HTML but you can pass pdf, print or doc.
    Returns:
    The link to this page

    linkPageRSS

    public any linkPageRSS([any category], [boolean comments='false'], [any page], [boolean ssl='[runtime expression]'])

    Link to the ContentBox Page RSS Feeds

    Parameters:
    category - The category to filter on
    comments - Page comments or not, defaults to false
    page - The page you want to filter on
    ssl - Use SSL or not, defaults to false.

    linkPageWithSlug

    public any linkPageWithSlug(any slug, [boolean ssl='[runtime expression]'], [any format='html'])

    Link to a specific page using a slug only

    Parameters:
    slug - The page slug to link to
    ssl - Use SSL or not, defaults to false.
    format - The format output of the content default is HTML bu you can pass pdf,print or doc.

    linkRSS

    public any linkRSS([any category], [any comments='false'], [any entry], [boolean ssl='[runtime expression]'])

    Link to RSS feeds that ContentBox generates, by default it is the recent updates feed

    Parameters:
    category - You can optionally pass the category to filter on
    comments - A boolean flag that determines if you want the comments RSS feed
    entry - You can optionally pass the entry to filter the comment's RSS feed
    ssl - Use SSL or not, defaults to false.

    linkSearch

    public any linkSearch([boolean ssl='[runtime expression]'])

    Link to the search route for this blog

    Parameters:
    ssl - Use SSL or not, defaults to false.

    linkSelf

    public any linkSelf()

    Create a link to the current page/entry you are on


    linkSiteRSS

    public any linkSiteRSS([any category], [boolean comments='false'], [string slug], [boolean ssl='[runtime expression]'])

    Link to the ContentBox Site RSS Feeds

    Parameters:
    category - The category to filter on
    comments - Do comments RSS feeds
    slug - The content slug to filter on when using comments
    ssl - Use SSL or not, defaults to false.

    linkToParentPage

    public any linkToParentPage([any page], [any text=''])

    Create an href to a page's parent

    Parameters:
    page - Optional page to create link for, else look for current page
    text - The optional text to use for the link, else it uses the page's title

    mainView

    public any mainView([struct args='[runtime expression]'])

    Render the incoming event's main view, basically a proxy to ColdBox's controller.getRenderer().view().

    Parameters:
    args - true

    menu

    public any menu(string slug, any type='html', array slugCache='[runtime expression]')

    Build out a menu from the defined menus in ContentBox.

    Parameters:
    slug - The menu slug to build
    type - The type either 'html' or 'data', default is HTML
    slugCache - The cache of menu slugs already used in this request
    Returns:
    HTML of the menu or a struct representing the menu

    moduleRelocate

    public any moduleRelocate(string module, string event, [string URL], [string URI], [string queryString=''], [any persist], [struct persistStruct], [boolean ssl], [any baseURL], [boolean postProcessExempt], [numeric statusCode])

    Relocate to a ContentBox module event

    Parameters:
    module - The module to link this URL to
    event - The name of the event to run, if not passed, then it will use the default event found in your configuration file
    URL - The full URL you would like to relocate to instead of an event: ex: URL='http://www.google.com'
    URI - The relative URI you would like to relocate to instead of an event: ex: URI='/mypath/awesome/here'
    queryString - The query string to append, if needed. If in SES mode it will be translated to convention name value pairs
    persist - What request collection keys to persist in flash ram
    persistStruct - A structure key-value pairs to persist in flash ram
    ssl - Whether to relocate in SSL or not
    baseURL - Use this baseURL instead of the index.cfm that is used by default. You can use this for ssl or any full base url you would like to use. Ex: https://mysite.com/index.cfm
    postProcessExempt - Do not fire the postProcess interceptors
    statusCode - The status code to use in the relocation

    prepareUIRequest

    public CBHelper prepareUIRequest([string layout], [string title], [string description], [string keywords])

    Prepare a ContentBox UI request. This sets ups settings, theme, etc. This method is usualy called automatically for you on the UI module. However, you can use it a-la-carte if you are building ajax or module extensions

    Parameters:
    layout - An optional layout to set for you in the request.
    title - Optional request page metadata title
    description - Optional request page metadata description
    keywords - Optional request page metadata keywords

    quickAvatar

    public string quickAvatar(any author, [numeric size='25'], [string class='gravatar'])

    Renders out an author's avatar

    Parameters:
    author - The author object to render an avatar from
    size - The size of the gravatar, by default we use 25 pixels
    class

    quickCategories

    public any quickCategories([string template='category'], [string collectionAs='category'], [struct args='[runtime expression]'], [any isPublic='true'])

    Render out categories anywhere using ColdBox collection rendering

    Parameters:
    template - The name of the template to use, by default it looks in the 'templates/category.cfm' convention, no '.cfm' please
    collectionAs - The name of the iterating object in the template, by default it is called 'category'
    args - A structure of name-value pairs to pass to the template
    isPublic - Return public categories by default. False, return private categories, null return all categories.

    quickCategoryLinks

    public any quickCategoryLinks(any entry)

    quick HTML ********************************************

    Parameters:
    entry

    quickCommentForm

    public any quickCommentForm(any content)

    quickCommentForm will build a standard ContentBox Comment Form according to the CommentForm widget

    Parameters:
    content - The content this comment form will be linked to, page or entry

    quickComments

    public any quickComments([string template='comment'], [string collectionAs='comment'], [struct args='[runtime expression]'])

    Render out comments anywhere using ColdBox collection rendering

    Parameters:
    template - The name of the template to use, by default it looks in the 'templates/comment.cfm' convention, no '.cfm' please
    collectionAs - The name of the iterating object in the template, by default it is called 'comment'
    args - A structure of name-value pairs to pass to the template

    quickCustomFields

    public any quickCustomFields()

    Render out custom fields for the current content


    quickEntries

    public any quickEntries([string template='entry'], [string collectionAs='entry'], [struct args='[runtime expression]'])

    Render out entries in the home page by using our ColdBox collection rendering

    Parameters:
    template - The name of the template to use, by default it looks in the 'templates/entry.cfm' convention, no '.cfm' please
    collectionAs - The name of the iterating object in the template, by default it is called 'entry'
    args - A structure of name-value pairs to pass to the template

    quickEntry

    public any quickEntry([string template='entry'], [string collectionAs='entry'], [struct args='[runtime expression]'])

    Render out an entry using your pre-defined 'entry' template

    Parameters:
    template - The name of the template to use, by default it looks in the 'templates/entry.cfm' convention, no '.cfm' please
    collectionAs - The name of the iterating object in the template, by default it is called 'entry'
    args - A structure of name-value pairs to pass to the template

    quickLayout

    public any quickLayout(any layout, [any view=''], [any module='[runtime expression]'], [any args='[runtime expression]'], [any viewModule=''], [boolean prePostExempt='false'])

    QuickLayout is a proxy to ColdBox's renderLayout method with the addition of prefixing the location of the layout according to the layout theme you are using. All the arguments are the same as layout()'s methods

    Parameters:
    layout - The layout to render out
    view - The view to render within this layout
    module - The module to explicitly render this layout from
    args - An optional set of arguments that will be available to this layouts/view rendering ONLY
    viewModule - The module to explicitly render the view from
    prePostExempt - If true, pre/post layout interceptors will not be fired. By default they do fire

    quickPaging

    public any quickPaging()

    Render out paging for blog entries only


    quickRelatedContent

    public any quickRelatedContent([string template='relatedContent'], [string collectionAs='relatedContent'], [struct args='[runtime expression]'])

    Render out related content anywhere using ColdBox collection rendering

    Parameters:
    template - The name of the template to use, by default it looks in the 'templates/relatedContent.cfm' convention, no '.cfm' please
    collectionAs - The name of the iterating object in the template, by default it is called 'relatedContent'
    args - A structure of name-value pairs to pass to the template

    quickSearchForm

    public any quickSearchForm()

    quickSearchForm will build a standard ContentBox Content Search Form according to the SearchForm widget


    quickSearchPaging

    public any quickSearchPaging()

    Render out paging for search content


    quickView

    public any quickView(any view, [any cache='false'], [any cacheTimeout], [any cacheLastAccessTimeout], [any cacheSuffix], [any cacheProvider='template'], [any module='contentbox'], [struct args], [any collection], [any collectionAs=''], [numeric collectionStartRow='1'], [numeric collectionMaxRows='0'], [any collectionDelim=''], [boolean prepostExempt='false'])

    QuickView is a proxy to ColdBox's view method with the addition of prefixing the location of the view according to the theme you are using. All the arguments are the same as `view()'s` methods

    Parameters:
    view - The view in the theme to render
    cache - Cache the output or not
    cacheTimeout - The time in minutes to cache the view
    cacheLastAccessTimeout - The time in minutes the view will be removed from cache if idle or requested
    cacheSuffix - The suffix to add into the cache entry for this view rendering
    cacheProvider - The provider to cache this view in, defaults to 'template'
    module - The module to render the view from explicitly
    args - A struct of arguments to pass into the view for rendering, will be available as 'args' in the view.
    collection - A collection to use by this Renderer to render the view as many times as the items in the collection (Array or Query)
    collectionAs - The name of the collection variable in the partial rendering. If not passed, we will use the name of the view by convention
    collectionStartRow - The start row to limit the collection rendering with
    collectionMaxRows - The max rows to iterate over the collection rendering with
    collectionDelim - A string to delimit the collection renderings by
    prepostExempt - If true, pre/post view interceptors will not be fired. By default they do fire

    r

    public any r(string resource, [string defaultValue], [string locale], [any values], [string bundle])

    Retrieve i18n resources

    Parameters:
    resource - The resource (key) to retrieve from a loaded bundle or pass a @bundle
    defaultValue - A default value to send back if the resource (key) not found
    locale - Pass in which locale to take the resource from. By default it uses the user's current set locale
    values - An array, struct or simple string of value replacements to use on the resource string
    bundle - The bundle alias to use to get the resource from when using multiple resource bundles. By default the bundle name used is 'default'

    rootMenu

    public any rootMenu([any excludes=''], [any type='ul'], [any typeClass=''], [any separator=''], [any levels='1'], [any elementClass=''], [any parentClass='parent'], [any activeClass='active'])

    Render out a quick menu for root level pages

    Parameters:
    excludes - The list of pages to exclude from the menu
    type - The type of menu, valid choices are: ul,ol,li,data,none
    typeClass - The CSS class(es) to add to the type tag, defaults to 'submenu'
    separator - Used if type eq none, to separate the list of href's
    levels - The number of levels to nest hierarchical pages, by default it does only 1 level, * does all levels
    elementClass - The name of the CSS class to attach to the menu
  • element
  • parentClass - The name of the CSS class to attach to the menu
  • element when it has nested elements, by default it is 'parent'
  • activeClass - The name of the CSS class to attach to the menu
  • element when that element is the current page you are on, by default it is 'active'

  • searchTermExists

    public boolean searchTermExists()

    Determine if you have a search term


    sep

    private any sep()

    Get the site URL separator depending if you have an entry point or not


    setAuthorService

    public any setAuthorService(any authorService)

    Parameters:
    authorService

    setCategoryService

    public any setCategoryService(any categoryService)

    Parameters:
    categoryService

    setCbResourceService

    public any setCbResourceService(any cbResourceService)

    Parameters:
    cbResourceService

    setCommentService

    public any setCommentService(any commentService)

    Parameters:
    commentService

    setContentStoreService

    public any setContentStoreService(any contentStoreService)

    Parameters:
    contentStoreService

    setController

    public any setController(any controller)

    Parameters:
    controller

    setEntryService

    public any setEntryService(any entryService)

    Parameters:
    entryService

    setMarkdown

    public any setMarkdown(any markdown)

    Parameters:
    markdown

    setMenuItemService

    public any setMenuItemService(any menuItemService)

    Parameters:
    menuItemService

    setMenuService

    public any setMenuService(any menuService)

    Parameters:
    menuService

    setMetaDescription

    public any setMetaDescription(string description)

    Set the Meta Description for the request

    Parameters:
    description - - The new Description

    setMetaImageURL

    public any setMetaImageURL(string imageURL)

    Set the Meta ImageURL for the request

    Parameters:
    imageURL - - The new imageURL

    setMetaKeywords

    public any setMetaKeywords(string keywords)

    Set the Meta Keywords for the request

    Parameters:
    keywords - - The new Keywords

    setMetaOGType

    public any setMetaOGType(string OGType)

    Set the Meta OGType for the request

    Parameters:
    OGType - - The new OGType

    setMetaTitle

    public any setMetaTitle(string title)

    Set the Meta Title for the request

    Parameters:
    title - - The new title

    setMetaURL

    public any setMetaURL(string url)

    Set the Meta Canonical URL for the request

    Parameters:
    url - - The new url

    setMobileDetector

    public any setMobileDetector(any mobileDetector)

    Parameters:
    mobileDetector

    setModuleService

    public any setModuleService(any moduleService)

    Parameters:
    moduleService

    setNextModuleEvent Deprecated

    public any setNextModuleEvent(string module, string event, [string URL], [string URI], [string queryString=''], [any persist], [struct persistStruct], [boolean ssl], [any baseURL], [boolean postProcessExempt], [numeric statusCode])

    Deprecated:
    Please use moduleRelocate()
    Parameters:
    module
    event
    URL
    URI
    queryString
    persist
    persistStruct
    ssl
    baseURL
    postProcessExempt
    statusCode

    setPageService

    public any setPageService(any pageService)

    Parameters:
    pageService

    setRequestService

    public any setRequestService(any requestService)

    Parameters:
    requestService

    setRequestStorage

    public any setRequestStorage(any requestStorage)

    Parameters:
    requestStorage

    setSecurityService

    public any setSecurityService(any securityService)

    Parameters:
    securityService

    setSettingService

    public any setSettingService(any settingService)

    Parameters:
    settingService

    setSiteService

    public any setSiteService(any siteService)

    Parameters:
    siteService

    setThemeService

    public any setThemeService(any themeService)

    Parameters:
    themeService

    setWidgetService

    public any setWidgetService(any widgetService)

    Parameters:
    widgetService

    setWirebox

    public any setWirebox(any wirebox)

    Parameters:
    wirebox

    setting

    public any setting(any key, [any defaultValue])

    Get a global setting value by key or by default value

    Parameters:
    key - The setting key to get
    defaultValue - The default value to return if not found

    site

    public any site([string siteID=''])

    Get the current site object that you are visiting the UI from via our discovery methods - Check argument override - Check prc set site - Do full detection

    Parameters:
    siteID - The site id to get the root from, by default we use the current site you are on

    siteBaseURL

    public any siteBaseURL([string siteID=''])

    Get the HTML base URL that is used for the HTML tag. This also accounts for SSL or not.

    Parameters:
    siteID - The site id to get the root from, by default we use the current site you are on

    siteDescription

    public any siteDescription()

    Retrieve the site description


    siteEmail

    public any siteEmail()

    Retrieve the site administrator email


    siteKeywords

    public any siteKeywords()

    Retrieve the site keywords


    siteName

    public any siteName()

    Retrieve the site name


    siteOutgoingEmail

    public any siteOutgoingEmail()

    Retrieve the site outgoing email


    siteRoot

    public any siteRoot([string siteID=''])

    Get the site root location using your configured module's entry point and the discovered site

    Parameters:
    siteID - The site id to get the root from, by default we use the current site you are on

    siteSetting

    public any siteSetting(any key, [any defaultValue])

    Get a site setting value by key or by default value

    Parameters:
    key - The setting key to get
    defaultValue - The default value to return if not found
    Throws:
    InvalidSettingException

    siteTagLine

    public any siteTagLine()

    Retrieve the site tagline


    stripHTML

    public any stripHTML(any stringTarget)

    utility to strip HTML

    Parameters:
    stringTarget

    stripWhitespace

    public any stripWhitespace(any stringTarget)

    removes CR LF TAB double spaces from string

    Parameters:
    stringTarget

    subPageMenu

    public any subPageMenu([any page], [any excludes=''], [any type='ul'], [any typeClass=''], [any separator=''], [boolean showNone='true'], [any levels='1'], [any elementClass=''], [any parentClass='parent'], [any activeClass='active'], [any activeShowChildren='false'])

    Create a sub page menu for a given page or current page

    Parameters:
    page - Optional page to create menu for, else look for current page, this can be a page object or a page slug
    excludes - The list of pages to exclude from the menu
    type - The type of menu, valid choices are: ul,ol,li,none
    typeClass - The CSS class(es) to add to the type tag, defaults to 'submenu'
    separator - Used if type eq none, to separate the list of href's
    showNone - Shows a 'No Sub Pages' message or not
    levels - The number of levels to nest hierarchical pages, by default it does only 1 level, * does all levels
    elementClass - The name of the CSS class to attach to the menu
  • element
  • parentClass - The name of the CSS class to attach to the menu
  • element when it has nested elements, by default it is 'parent'
  • activeClass - The name of the CSS class to attach to the menu
  • element when that element is the current page you are on, by default it is 'active'
  • activeShowChildren - If true, then we will show the children of the active menu element, else we just show the active element

    themeName

    public any themeName()

    Get the name of the current set and active theme


    themeRecord

    public any themeRecord()

    Get the theme record of the current set and active theme


    themeRoot

    public any themeRoot()

    Get the location of your currently defined theme in the application, great for assets, cfincludes, etc


    themeSetting

    public any themeSetting(any key, [any defaultValue])

    Get a theme setting

    Parameters:
    key - The name of the theme setting
    defaultValue - The default value if the layout setting does not exist

    widget

    public any widget(any name, [struct args='[runtime expression]'])

    Execute a widget's renderit method

    Parameters:
    name - The name of the installed widget to execute
    args - The argument collection to pass to the widget's renderIt() method