Class: LWS::CorporateWebsite::Page

Inherits:
Generic::Model show all
Defined in:
lib/lws/apps/corporate_website.rb

Overview

The page class

Instance Attribute Summary collapse

Attributes inherited from Generic::Model

#created_at, #updated_at, #url, #url_html

Method Summary

Methods inherited from Generic::Model

#deep_dup, #dig, #reload, #rollback, #save

Instance Attribute Details

#articlesArray<Article>

Returns the articles that are part of the page.

Returns:

  • (Array<Article>)

    the articles that are part of the page



137
138
# File 'lib/lws/apps/corporate_website.rb', line 137

has_many :articles,
uri: "pages/:page_id/articles(/:id)"

#idString (readonly)

Returns the slug of the page.

Returns:

  • (String)

    the slug of the page



166
# File 'lib/lws/apps/corporate_website.rb', line 166

attribute :slug

#languageString

Returns the ID of the language of the page (2 character).

Returns:

  • (String)

    the ID of the language of the page (2 character)



142
# File 'lib/lws/apps/corporate_website.rb', line 142

attribute :language

Returns the name of the menu (head) the page belongs to.

Returns:

  • (String)

    the name of the menu (head) the page belongs to



146
# File 'lib/lws/apps/corporate_website.rb', line 146

attribute :menu_kind

Returns the name of the page in the menu.

Returns:

  • (String)

    the name of the page in the menu



150
# File 'lib/lws/apps/corporate_website.rb', line 150

attribute :menu_name

#newsBoolean?

Returns flag whether the page is a news page.

Returns:

  • (Boolean, nil)

    flag whether the page is a news page



154
# File 'lib/lws/apps/corporate_website.rb', line 154

attribute :news

#orderInteger

Returns the order (number) of the page withing the menu.

Returns:

  • (Integer)

    the order (number) of the page withing the menu



158
# File 'lib/lws/apps/corporate_website.rb', line 158

attribute :order

#sitemapBoolean

Returns flag whether the page is included in the sitemap.

Returns:

  • (Boolean)

    flag whether the page is included in the sitemap



162
# File 'lib/lws/apps/corporate_website.rb', line 162

attribute :sitemap

Returns the URL of a YouTube video used for the page.

Returns:

  • (String, nil)

    the URL of a YouTube video used for the page



170
# File 'lib/lws/apps/corporate_website.rb', line 170

attribute :youtube_link