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 = id:authorService@cb
    true false
    any categoryService


    • access = public
    • returntype = any
    • inject = id:categoryService@cb
    true false
    any commentService


    • access = public
    • returntype = any
    • inject = id:commentService@cb
    true false
    any contentStoreService


    • access = public
    • returntype = any
    • inject = id:contentStoreService@cb
    true false
    any controller


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


    • access = public
    • returntype = any
    • inject = id:entryService@cb
    true false
    any menuItemService


    • access = public
    • returntype = any
    • inject = id:menuItemService@cb
    true false
    any menuService


    • access = public
    • returntype = any
    • inject = id:menuService@cb
    true false
    any mobileDetector


    • access = public
    • returntype = any
    • inject = id:mobileDetector@cb
    true false
    any moduleService


    • access = public
    • returntype = any
    • inject = id:moduleService@cb
    true false
    any pageService


    • access = public
    • returntype = any
    • inject = id:pageService@cb
    true false
    any requestService


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


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


    • access = public
    • returntype = any
    • inject = id:settingService@cb
    true false
    any widgetService


    • access = public
    • returntype = any
    • inject = id:widgetService@cb
    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 linkTo, [any queryString=''], [boolean ssl='false'])
         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 contentStore(any slug, [any defaultValue=''])
         Get a published content store and return its latest active content.
    any contentStoreObject(any slug)
         Get a content store object by slug, if not found it returns null.
    any customHTML(any slug, [any defaultValue=''])
         Get a published custom HTML content pieces by slug: DEPRECATED, use contentStore() instead.
    any event(any state, [struct data='[runtime expression]'])
         events ********************************************.
    string getAuthorService()
    any getBlogEntryPoint()
         Get the blog entry point as specified in the settings.
    any getCategoryFilter()
    string getCategoryService()
    array getCommentErrors()
    string getCommentService()
    any getContentBoxCodeName()
         get contentbox codename.
    any getContentBoxCodeNameURL()
         get contentbox codename URL.
    any getContentBoxVersion()
         get contentbox version.
    string getContentStoreService()
    string getController()
    any getCurrentCategories()
    any getCurrentComments()
    any getCurrentCommentsCount()
    struct getCurrentCustomFields()
         Get the current page's or blog entries custom fields as a struct.
    any getCurrentEntries()
    any getCurrentEntriesCount()
    any getCurrentEntry()
    any getCurrentPage()
    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()
         Get Home Page slug set up by the administrator settings.
    any getMaintenanceMessage()
         Get the maintenance message from the ContentBox settings.
    string getMenuItemService()
    string getMenuService()
    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()
    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 request context.
    string getRequestService()
    string getResourceService()
    any getSearchResults()
         Get the curent search results object.
    any getSearchResultsContent()
         get the curent search results HTML content.
    any getSearchTerm()
         Get Search Term used.
    string getSettingService()
    any getWidget(any name)
         Return a widget object.
    string getWidgetService()
    string getWirebox()
    any getYearFilter()
    any isAdminLoaded()
         Verifies if the admin module is loaded.
    boolean isArchivesView()
    boolean isBlogView()
    boolean isCommentFormError()
    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()
    boolean isSearchView()
         search ********************************************.
    any layoutName()
         Get the layout name.
    any layoutRoot()
         Layout Location.
    any layoutSetting()
         Get a theme setting.
    any linkAdmin([any event=''], [boolean ssl='false'])
         Link to the admin.
    any linkAdminLogin([boolean ssl='false'])
         Link to the admin login.
    any linkAdminLogout([boolean ssl='false'])
         Link to the admin logout.
    any linkArchive([any year], [any month], [any day], [boolean ssl='false'])
         Link to a specific filtered archive of entries.
    any linkBlog([boolean ssl='false'])
         Create a link to your site blog.
    any linkCategory(any category, [boolean ssl='false'])
         Link to a specific filtered category view of blog entries.
    any linkCategoryWithSlug(string categorySlug, [boolean ssl='false'])
         Link to a specific filtered category view of blog entries.
    any linkComment(any comment, [boolean ssl='false'])
         Create a link to a specific comment in a page or in an entry.
    any linkCommentPost(any content, [boolean ssl='false'])
         Link to the commenting post action, this is where comments are submitted to.
    any linkComments(any content, [boolean ssl='false'])
         Create a link to an entry's or page's comments section.
    any linkContent(any content, [boolean ssl='false'], [any format='html'])
         Link to a specific content object.
    any linkContentSearch([boolean ssl='false'])
         Link to the content search route.
    any linkContentSubscription([boolean ssl='false'])
         Link to the content subscription route.
    any linkContentUnsubscribe(string token, [boolean ssl='false'])
         Link to the ContentBox Content Subscription unsubscribe URL.
    any linkEntry(any entry, [boolean ssl='false'], [any format='html'])
         Link to a specific blog entry's page.
    any linkEntryWithSlug(any slug, [boolean ssl='false'], [any format='html'])
         Link to a specific entry's page using a slug only.
    any linkHome([boolean ssl='false'])
         Create a link to your site root or home page entry point for your blog.
    any linkPage(any page, [boolean ssl='false'], [any format='html'])
         Link to a specific page.
    any linkPageRSS([any category], [boolean comments='false'], [any page], [boolean ssl='false'])
         Link to the ContentBox Page RSS Feeds.
    any linkPageWithSlug(any slug, [boolean ssl='false'], [any format='html'])
         Link to a specific page using a slug only.
    any linkRSS([any category], [any comments='false'], [any entry], [boolean ssl='false'])
         Link to RSS feeds that ContentBox generates, by default it is the recent updates feed.
    any linkSearch([boolean ssl='false'])
         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='false'])
         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.
    CBHelper prepareUIRequest([string layout])
         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]'])
         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='contentbox'], [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 renderview 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.
    any setAuthorService(any authorService)
    any setCategoryService(any categoryService)
    any setCommentService(any commentService)
    any setContentStoreService(any contentStoreService)
    any setController(any controller)
    any setEntryService(any entryService)
    any setMenuItemService(any menuItemService)
    any setMenuService(any menuService)
    any setMobileDetector(any mobileDetector)
    any setModuleService(any moduleService)
    any setNextModuleEvent(string module, [string URL], [string URI], [string queryString=''], [any persist], [struct persistStruct], [boolean ssl], [any baseURL], [boolean postProcessExempt], [numeric statusCode])
         SetNextEvent For ContentBox Modules.
    any setPageService(any pageService)
    any setRequestService(any requestService)
    any setResourceService(any resourceService)
    any setSettingService(any settingService)
    any setting(any key, [any value])
         get contentbox setting value by key or by default value.
    any setWidgetService(any widgetService)
    any setWirebox(any wirebox)
    any siteBaseURL()
         Get the site base SES URL.
    any siteDescription()
    any siteEmail()
    any siteKeywords()
    any siteName()
         site properties ********************************************.
    any siteOutgoingEmail()
    any siteRoot()
         Get the site root location using your configured module's entry point.
    any siteTagLine()
    any stripHTML(any stringTarget)
         utility to strip HTML.
    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 themeRoot()
         Get the location of your currently defined theme in the application, great for assets, cfincludes, etc.
    any themeSetting(any key, [any value])
         Get a theme setting.
    any widget(any name, [struct args='[runtime expression]'])
         Execute a widget's renderit method.
    any widgetRoot()
         Get the location of the widgets in the application, great for assets, cfincludes, etc.
     
    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 - id:authorService@cb
    serializable - true

    categoryService

    property any categoryService

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

    commentService

    property any commentService

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

    contentStoreService

    property any contentStoreService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - id:contentStoreService@cb
    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 - id:entryService@cb
    serializable - true

    menuItemService

    property any menuItemService

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

    menuService

    property any menuService

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

    mobileDetector

    property any mobileDetector

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

    moduleService

    property any moduleService

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

    pageService

    property any pageService

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

    requestService

    property any requestService

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

    resourceService

    property any resourceService

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

    settingService

    property any settingService

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

    widgetService

    property any widgetService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - id:widgetService@cb
    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 linkTo, [any queryString=''], [boolean ssl='false'])

    Build out ContentBox module links

    Parameters:
    module - The module to link this URL to
    linkTo - 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()


    contentStore

    public any contentStore(any slug, [any defaultValue=''])

    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.

    contentStoreObject

    public any contentStoreObject(any slug)

    Get a content store object by slug, if not found it returns null.

    Parameters:
    slug - The content slug to retrieve

    customHTML

    public any customHTML(any slug, [any defaultValue=''])

    Get a published custom HTML content pieces by slug: DEPRECATED, use contentStore() instead

    Parameters:
    slug
    defaultValue

    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 settings


    getCategoryFilter

    public any getCategoryFilter()


    getCategoryService

    public string getCategoryService()


    getCommentErrors

    public array getCommentErrors()


    getCommentService

    public string getCommentService()


    getContentBoxCodeName

    public any getContentBoxCodeName()

    get contentbox codename


    getContentBoxCodeNameURL

    public any getContentBoxCodeNameURL()

    get contentbox codename URL


    getContentBoxVersion

    public any getContentBoxVersion()

    get contentbox version


    getContentStoreService

    public string getContentStoreService()


    getController

    public string getController()


    getCurrentCategories

    public any getCurrentCategories()


    getCurrentComments

    public any getCurrentComments()


    getCurrentCommentsCount

    public any getCurrentCommentsCount()


    getCurrentCustomFields

    public struct getCurrentCustomFields()

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


    getCurrentEntries

    public any getCurrentEntries()


    getCurrentEntriesCount

    public any getCurrentEntriesCount()


    getCurrentEntry

    public any getCurrentEntry()


    getCurrentPage

    public any getCurrentPage()


    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()

    Get Home Page slug set up by the administrator settings


    getMaintenanceMessage

    public any getMaintenanceMessage()

    Get the maintenance message from the ContentBox settings


    getMenuItemService

    public string getMenuItemService()


    getMenuService

    public string getMenuService()


    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()


    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 request context

    Returns:
    coldbox.system.web.context.RequestContext

    getRequestService

    public string getRequestService()


    getResourceService

    public string getResourceService()


    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


    getSettingService

    public string getSettingService()


    getWidget

    public any getWidget(any name)

    Return a widget object

    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()


    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()


    isSearchView

    public boolean isSearchView()

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


    layoutName

    public any layoutName()

    Get the layout name. DO NOT USE, DEPRECATED. Use themeName() instead.


    layoutRoot

    public any layoutRoot()

    Layout Location. DO NOT USE, DEPRECATED. Use themeRoot instead.


    layoutSetting

    public any layoutSetting()

    Get a theme setting. PLEASE DO NOT USE ANYMORE, USE themeSetting()


    linkAdmin

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

    Link to the admin

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

    linkAdminLogin

    public any linkAdminLogin([boolean ssl='false'])

    Link to the admin login

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

    linkAdminLogout

    public any linkAdminLogout([boolean ssl='false'])

    Link to the admin logout

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

    linkArchive

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

    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([boolean ssl='false'])

    Create a link to your site blog

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

    linkCategory

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

    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='false'])

    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='false'])

    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='false'])

    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.

    linkComments

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

    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='false'], [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='false'])

    Link to the content search route

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

    linkContentSubscription

    public any linkContentSubscription([boolean ssl='false'])

    Link to the content subscription route

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

    linkContentUnsubscribe

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

    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='false'], [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='false'], [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([boolean ssl='false'])

    Create a link to your site root or home page entry point for your blog.

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

    linkPage

    public any linkPage(any page, [boolean ssl='false'], [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 output of the content default is HTML but you can pass pdf,print or doc.

    linkPageRSS

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

    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='false'], [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='false'])

    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='false'])

    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='false'])

    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().renderView().

    Parameters:
    args - true

    menu

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

    Build out a menu

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

    prepareUIRequest

    public CBHelper prepareUIRequest([string layout])

    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.

    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]'])

    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

    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='contentbox'], [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 renderLayout()'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 renderview 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 `renderView()'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


    setAuthorService

    public any setAuthorService(any authorService)

    Parameters:
    authorService

    setCategoryService

    public any setCategoryService(any categoryService)

    Parameters:
    categoryService

    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

    setMenuItemService

    public any setMenuItemService(any menuItemService)

    Parameters:
    menuItemService

    setMenuService

    public any setMenuService(any menuService)

    Parameters:
    menuService

    setMobileDetector

    public any setMobileDetector(any mobileDetector)

    Parameters:
    mobileDetector

    setModuleService

    public any setModuleService(any moduleService)

    Parameters:
    moduleService

    setNextModuleEvent

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

    SetNextEvent For ContentBox Modules

    Parameters:
    module - The module to link this URL to
    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

    setPageService

    public any setPageService(any pageService)

    Parameters:
    pageService

    setRequestService

    public any setRequestService(any requestService)

    Parameters:
    requestService

    setResourceService

    public any setResourceService(any resourceService)

    Parameters:
    resourceService

    setSettingService

    public any setSettingService(any settingService)

    Parameters:
    settingService

    setting

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

    get contentbox setting value by key or by default value

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

    setWidgetService

    public any setWidgetService(any widgetService)

    Parameters:
    widgetService

    setWirebox

    public any setWirebox(any wirebox)

    Parameters:
    wirebox

    siteBaseURL

    public any siteBaseURL()

    Get the site base SES URL


    siteDescription

    public any siteDescription()


    siteEmail

    public any siteEmail()


    siteKeywords

    public any siteKeywords()


    siteName

    public any siteName()

    site properties ********************************************


    siteOutgoingEmail

    public any siteOutgoingEmail()


    siteRoot

    public any siteRoot()

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


    siteTagLine

    public any siteTagLine()


    stripHTML

    public any stripHTML(any stringTarget)

    utility to strip HTML

    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


    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 value])

    Get a theme setting

    Parameters:
    key - The name of the theme setting
    value - 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

    widgetRoot

    public any widgetRoot()

    Get the location of the widgets in the application, great for assets, cfincludes, etc