Podius::Component::Page - generic web page component (super class)
This component class includes common web page properties, like ``title'' and simple methods dealing with them. This component class may be used in both multilingual and polylingual projects (see is_multilingual). The intended meaning of all properties follows.
english_name (in Multilingual components only) is a name of the component in English that is used for labeling mostly, it is shared among language clones (see the Podius::Component::Multilingual manpage). This is unlike name that is supposed to be in the language of this component.
role is usually a short internal (and usually unique) string describing the purpose of the component, for example ``home'' or ``news section''. This may be used to find the component and in some sense to name it. This property is shared among language clones.
title is intended to be used inside the HTML element of the same name, however the recommended way is to use get_title instead (that fallbacks to name if title is not set).
phrase is usually a short public phrase describing the component. This is somewhat similar to role, but is not shared among language clones, so it may be in the language of this component. Intended to be used in the published page name for this component. The method get_uri is a recommended way to do this (it fallbacks to name if phrase is not set, and converts space chars).
keywords is usually several phrases associated with this component separated by a comma. It is intended to be used in HTML element ``<meta keywords=...>''.
description is usually a paragraph describing this component. It is intended to be used in HTML element ``<meta description=...>''.
abstract is usually a short text, intended to be used (usually together with the abstract texts of other similar components) in summaries or search results. It may either participate in the content of the page in addition to body or include the same info body does just succinctly. The content editors should decide on which one of these two possibilities to take accourding to the project needs.
body is usually a long text in ``WikiText'' format. It is intended to be used as the main content on the published page. The recommended way is to use body_as_html method that converts ``WikiText'' to HTML.
Booleans is_active and is_secure may be used as arbitrary flags, but usually mark active components (the ones ready to be published/shown) and secure components (may be used to define 2 sets of page components in the project, one is to be published for use with HTTP and another with HTTPS servers).
image is of type UserScalableImage, see the Podius::Component::ScalableImage manpage. If there is no need to attach any images to this Page component, just ignore this property, and vice versa, if it needs more than one image, subclass and add properties image2 or main_photo and so on.
the Podius::Component::Publishable manpage, the Podius::Property::Scalar manpage, the Podius::Property::BigScalar manpage, the Podius::Property::WikiText manpage, the Podius::Property::Boolean manpage, the Podius::Property::UserScalableImage manpage.
This internal method just checks for the actual super-class and returns 0 if the super-type is Publishable and 1 if Multilingual.
If positive boolean value is passed to this method meaning ``is for editor'' and when in the Multilingual mode, this method returns either english_name or role, if one of these properties is not empty. This way the interfaces that call this method with this flag may show the component name more predictable. I.e. when content editors know only a limited number of natural languages, but need to get some idea about what this component is all about anyway.
Parameters that the Podius::Persistense::ComponentCache manpage find_components accepts, like ``grep'', ``caching'' and similar are propagated to this method.
the Podius::Component manpage, the Podius::Component::Publishable manpage, the Podius::Component::Multilingual manpage, the Podius::Property::WikiText manpage, the Podius::Property::ScalableImage manpage.