contentbox.plugins

Class CBHelper

railo-context.Component
        extended by coldbox.system.FrameworkSupertype
            extended by coldbox.system.Plugin
                extended by contentbox.plugins.CBHelper
Class Attributes:
  • threadsafe
  •  
  • singleton
  •  
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  

    ContentBox - A Modular Content Platform Copyright 2012 by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com Apache License, Version 2.0 Copyright Since [2012] [Luis Majano and Ortus Solutions,Corp] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This is the ContentBox UI helper class that is injected by the CBRequest interceptor

    Property Summary
    type property default serializable required
    any authorService


    • inject = id:authorService@cb
    true false
    any categoryService


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


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


    • inject = id:contentStoreService@cb
    true false
    any entryService


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


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


    • inject = id:menuService@cb
    true false
    any minifier


    • inject = coldbox:myplugin:JSMin@contentbox
    true false
    any mobileDetector


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


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


    • inject = id:pageService@cb
    true false
    any settingService


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


    • inject = id:widgetService@cb
    true false
    Constructor Summary
    init(any controller)
    Method Summary
    any adminRoot()
    any breadCrumbs([any page], [any separator='>'])
         Create breadcrumbs for a 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(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()
    any getCategoryFilter()
    string getCategoryService()
    array getCommentErrors()
    string getCommentService()
    any getContentBoxCodeName()
    any getContentBoxCodeNameURL()
    any getContentBoxVersion()
    string getContentStoreService()
    any getCurrentCategories()
    any getCurrentComments()
    any getCurrentCommentsCount()
    struct getCurrentCustomFields()
    any getCurrentEntries()
    any getCurrentEntriesCount()
    any getCurrentEntry()
    any getCurrentPage()
    any getCurrentRelatedContent()
    any getCustomField(any key, [any defaultValue])
    any getDayFilter()
    string getEntryService()
    any getFlash()
         Return the current system flash scope.
    any getHomePage()
    any getMaintenanceMessage()
    string getMenuItemService()
    string getMenuService()
    any getMinifier()
         Minify methods ********************************************.
    any getMissingPage()
    string getMobileDetector()
    string getModuleService()
    any getMonthFilter()
    string getPageService()
    SearchResults getSearchResults()
    any getSearchResultsContent()
    any getSearchTerm()
    string getSettingService()
    any getWidget(any name)
         Return a widget object.
    string getWidgetService()
    any getYearFilter()
    boolean isArchivesView()
    boolean isBlogView()
    boolean isCommentFormError()
    any isCommentsEnabled([any content])
         Determines if site comments are enabled and if the entry accepts comments.
    boolean isEntryView()
    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()
    any layoutRoot()
         root methods ********************************************.
    any layoutSetting(any key, [any value])
         Get a layout 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()
         Render the incoming event's main view, basically a proxy to ColdBox's renderView().
    any menu(string slug, any type='html', array slugCache='[runtime expression]')
         MENUS ********************************************.
    any minify(any assets)
         Prepare source(s) statements using our fabulous jsmin compressor.
    CBHelper minifyClearCache()
    CBHelper minifyToHead(any assets)
         Prepare source(s) statements using our fabulous jsmin compressor and send them to the head section.
    CBHelper prepareUIRequest()
         Prepare a ContentBox UI request.
    any quickAvatar(any author, [numeric size='25'])
         Renders out an author's avatar.
    any quickCategories([any template='category'], [any collectionAs='category'], [any 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([any template='comment'], [any collectionAs='comment'], [any args='[runtime expression]'])
         Render out comments anywhere using ColdBox collection rendering.
    any quickCustomFields()
         Render out custom fields for the current content.
    any quickEntries([any template='entry'], [any collectionAs='entry'], [any args='[runtime expression]'])
         Render out entries in the home page by using our ColdBox collection rendering.
    any quickEntry([any template='entry'], [any collectionAs='entry'], [any 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=''], [any 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([any template='relatedContent'], [any collectionAs='relatedContent'], [any 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 module='contentbox'], [any args], [any collection], [any collectionAs], [any prepostExempt])
         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()
    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 setEntryService(any entryService)
    any setMenuItemService(any menuItemService)
    any setMenuService(any menuService)
    any setMinifier(any minifier)
    any setMobileDetector(any mobileDetector)
    any setModuleService(any moduleService)
    any setNextModuleEvent(string module, [string event], [any queryString=''], [boolean addToken='false'], [any persist], [struct persistStruct], [boolean ssl='false'], [boolean postProcessExempt='false'], [numeric statusCode])
         SetNextEvent For ContentBox Modules.
    any setPageService(any pageService)
    any setSettingService(any settingService)
    any setting(any key, [any value])
         settings ********************************************.
    any setWidgetService(any widgetService)
    any siteBaseURL()
    any siteDescription()
    any siteEmail()
    any siteKeywords()
    any siteName()
         site properties ********************************************.
    any siteOutgoingEmail()
    any siteRoot()
    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 widget(any name, [struct args='[runtime expression]'])
         Execute a widget's renderit method.
    any widgetRoot()
     
    Methods inherited from class coldbox.system.Plugin
    getpluginAuthor, getpluginAuthorURL, getPluginDescription, getPluginName, getpluginPath, getPluginVersion, getRequestCollection, getRequestContext, setpluginAuthor, setpluginAuthorURL, setPluginDescription, setPluginName, setPluginVersion
     
    Methods inherited from class coldbox.system.FrameworkSupertype
    addAsset, announceInterception, getCache, getController, getDatasource, getInstance, getInterceptor, getModel, getModuleConfig, getModuleSettings, getMyPlugin, getPlugin, getRenderer, getSetting, getSettingStructure, includeUDF, loadApplicationHelpers, locateDirectoryPath, locateFilePath, persistVariables, populateModel, renderExternalView, renderLayout, renderView, runEvent, setController, setNextEvent, setSetting, settingExists
     
    Methods inherited from class railo-context.Component
    None

    Constructor Detail

    init

    public init(any controller)

    Parameters:
    controller

    Property Detail

    authorService

    property any authorService

    Attributes:
    required - false
    inject - id:authorService@cb
    serializable - true

    categoryService

    property any categoryService

    Attributes:
    required - false
    inject - id:categoryService@cb
    serializable - true

    commentService

    property any commentService

    Attributes:
    required - false
    inject - id:commentService@cb
    serializable - true

    contentStoreService

    property any contentStoreService

    Attributes:
    required - false
    inject - id:contentStoreService@cb
    serializable - true

    entryService

    property any entryService

    Attributes:
    required - false
    inject - id:entryService@cb
    serializable - true

    menuItemService

    property any menuItemService

    Attributes:
    required - false
    inject - id:menuItemService@cb
    serializable - true

    menuService

    property any menuService

    Attributes:
    required - false
    inject - id:menuService@cb
    serializable - true

    minifier

    property any minifier

    Attributes:
    required - false
    inject - coldbox:myplugin:JSMin@contentbox
    serializable - true

    mobileDetector

    property any mobileDetector

    Attributes:
    required - false
    inject - id:mobileDetector@cb
    serializable - true

    moduleService

    property any moduleService

    Attributes:
    required - false
    inject - id:moduleService@cb
    serializable - true

    pageService

    property any pageService

    Attributes:
    required - false
    inject - id:pageService@cb
    serializable - true

    settingService

    property any settingService

    Attributes:
    required - false
    inject - id:settingService@cb
    serializable - true

    widgetService

    property any widgetService

    Attributes:
    required - false
    inject - id:widgetService@cb
    serializable - true

    Method Detail

    adminRoot

    public any adminRoot()


    breadCrumbs

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

    Create breadcrumbs for a page

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

    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(Menu menu, array slugCache='[runtime expression]')

    Builds out a custom menu

    Parameters:
    menu - The root menu 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 - The content slug to retrieve
    defaultValue - The default value to use if custom html element not found.

    event

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

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

    Parameters:
    state
    data

    getAuthorService

    public string getAuthorService()


    getBlogEntryPoint

    public any getBlogEntryPoint()


    getCategoryFilter

    public any getCategoryFilter()


    getCategoryService

    public string getCategoryService()


    getCommentErrors

    public array getCommentErrors()


    getCommentService

    public string getCommentService()


    getContentBoxCodeName

    public any getContentBoxCodeName()


    getContentBoxCodeNameURL

    public any getContentBoxCodeNameURL()


    getContentBoxVersion

    public any getContentBoxVersion()


    getContentStoreService

    public string getContentStoreService()


    getCurrentCategories

    public any getCurrentCategories()


    getCurrentComments

    public any getCurrentComments()


    getCurrentCommentsCount

    public any getCurrentCommentsCount()


    getCurrentCustomFields

    public struct getCurrentCustomFields()


    getCurrentEntries

    public any getCurrentEntries()


    getCurrentEntriesCount

    public any getCurrentEntriesCount()


    getCurrentEntry

    public any getCurrentEntry()


    getCurrentPage

    public any getCurrentPage()


    getCurrentRelatedContent

    public any getCurrentRelatedContent()


    getCustomField

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

    Parameters:
    key
    defaultValue

    getDayFilter

    public any getDayFilter()


    getEntryService

    public string getEntryService()


    getFlash

    public any getFlash()

    Return the current system flash scope


    getHomePage

    public any getHomePage()


    getMaintenanceMessage

    public any getMaintenanceMessage()


    getMenuItemService

    public string getMenuItemService()


    getMenuService

    public string getMenuService()


    getMinifier

    public any getMinifier()

    Minify methods ********************************************


    getMissingPage

    public any getMissingPage()


    getMobileDetector

    public string getMobileDetector()


    getModuleService

    public string getModuleService()


    getMonthFilter

    public any getMonthFilter()


    getPageService

    public string getPageService()


    getSearchResults

    public SearchResults getSearchResults()


    getSearchResultsContent

    public any getSearchResultsContent()


    getSearchTerm

    public any getSearchTerm()


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


    getYearFilter

    public any getYearFilter()


    isArchivesView

    public boolean isArchivesView()


    isBlogView

    public boolean isBlogView()


    isCommentFormError

    public boolean isCommentFormError()


    isCommentsEnabled

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


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


    layoutRoot

    public any layoutRoot()

    root methods ********************************************


    layoutSetting

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

    Get a layout setting

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

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

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


    menu

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

    MENUS ********************************************

    Parameters:
    slug
    type
    slugCache

    minify

    public any minify(any assets)

    Prepare source(s) statements using our fabulous jsmin compressor

    Parameters:
    assets - A list of js or css files to compress and add to the page. They will be concatenated in order

    minifyClearCache

    public CBHelper minifyClearCache()


    minifyToHead

    public CBHelper minifyToHead(any assets)

    Prepare source(s) statements using our fabulous jsmin compressor and send them to the head section

    Parameters:
    assets - A list of js or css files to compress and add to the page. They will be concatenated in order

    prepareUIRequest

    public CBHelper prepareUIRequest()

    Prepare a ContentBox UI request. This sets ups settings, layout, 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


    quickAvatar

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

    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

    quickCategories

    public any quickCategories([any template='category'], [any collectionAs='category'], [any 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([any template='comment'], [any collectionAs='comment'], [any 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([any template='entry'], [any collectionAs='entry'], [any 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([any template='entry'], [any collectionAs='entry'], [any 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=''], [any 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
    view
    module
    args
    viewModule
    prePostExempt

    quickPaging

    public any quickPaging()

    Render out paging for blog entries only


    quickRelatedContent

    public any quickRelatedContent([any template='relatedContent'], [any collectionAs='relatedContent'], [any 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 module='contentbox'], [any args], [any collection], [any collectionAs], [any prepostExempt])

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

    Parameters:
    view
    cache
    cacheTimeout
    cacheLastAccessTimeout
    cacheSuffix
    module
    args
    collection
    collectionAs
    prepostExempt

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


    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

    setEntryService

    public any setEntryService(any entryService)

    Parameters:
    entryService

    setMenuItemService

    public any setMenuItemService(any menuItemService)

    Parameters:
    menuItemService

    setMenuService

    public any setMenuService(any menuService)

    Parameters:
    menuService

    setMinifier

    public any setMinifier(any minifier)

    Parameters:
    minifier

    setMobileDetector

    public any setMobileDetector(any mobileDetector)

    Parameters:
    mobileDetector

    setModuleService

    public any setModuleService(any moduleService)

    Parameters:
    moduleService

    setNextModuleEvent

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

    SetNextEvent For ContentBox Modules

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

    setPageService

    public any setPageService(any pageService)

    Parameters:
    pageService

    setSettingService

    public any setSettingService(any settingService)

    Parameters:
    settingService

    setting

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

    settings ********************************************

    Parameters:
    key
    value

    setWidgetService

    public any setWidgetService(any widgetService)

    Parameters:
    widgetService

    siteBaseURL

    public any siteBaseURL()


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


    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

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