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

#article_idsArray<Integer>

Returns the IDs of the articles that are part of the page.

Returns:

  • (Array<Integer>)

    the IDs of the articles that are part of the page



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

attribute :article_ids

#articlesArray<Article>

Returns the articles that are part of the page.

Returns:

  • (Array<Article>)

    the articles that are part of the page



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

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

#idString (readonly)

Returns the slug of the page.

Returns:

  • (String)

    the slug of the page



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

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)



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

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



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

attribute :menu_kind

Returns the name of the page in the menu.

Returns:

  • (String)

    the name of the page in the menu



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

attribute :menu_name

#newsBoolean?

Returns flag whether the page is a news page.

Returns:

  • (Boolean, nil)

    flag whether the page is a news page



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

attribute :news

#orderInteger

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

Returns:

  • (Integer)

    the order (number) of the page withing the menu



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

attribute :order

#sitemapBoolean

Returns flag whether the page is included in the sitemap.

Returns:

  • (Boolean)

    flag whether the page is included in the sitemap



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

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



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

attribute :youtube_link