Skip to main content

Views

Views for the front page are defined in the theme views/Front directory. Thefront_page_html.php view is used to generate the front page. Other views may added to support additional home pages accessible using alternative URLs.

View Variables​

The following variables are defined for front page views:

VariableDescription
configA object providing access to the front.conf configuration file
result_contextThe current ResultContext object
featured_setThe code of the set to display
featured_set_idThe internal set_id value of the set to display
featured_set_item_idsThe item list for the current set as an array of set item ids
featured_set_items_as_search_resultThe item list for the current set as an iterable SearchResult object

Defining and Referencing Alternative Front Pages​

Any number of "front" pages may be defined. The page defined in views/Front/front_page_html.php will always be used as the default, loading whenever the site is referenced at its root (Eg. https://example.com). Additional front pages may be loaded using the site URL with Front/<view name> appended, where <view name> is the name of the view without the "_html.php" suffix. For example, if a view named alternate_html.php is defined in the theme's views/Front directory it can be loaded using a URL such as https://example.com/Front/alternate.