Class: CamaleonCms::NavMenu
- Inherits:
-
TermTaxonomy
- Object
- ActiveRecord::Base
- CamaleonRecord
- TermTaxonomy
- CamaleonCms::NavMenu
- Defined in:
- app/models/camaleon_cms/nav_menu.rb
Constant Summary
Constants inherited from TermTaxonomy
TermTaxonomy::TRANSLATION_TAG_HIDE_MAP, TermTaxonomy::TRANSLATION_TAG_HIDE_REGEX, TermTaxonomy::TRANSLATION_TAG_RESTORE_MAP, TermTaxonomy::TRANSLATION_TAG_RESTORE_REGEX
Instance Method Summary collapse
-
#append_menu_item(value) ⇒ Object
add menu item for current menu value: (Hash) is a hash object that contains label, type, link options for type: post | category | post_type | post_tag | external sample: “my label”, type: “external”, link: “camaleon.website”, target: ‘_blank’ sample: “my label”, type: “post”, link: 10 sample: “my label”, type: “category”, link: 12 return item created.
-
#skip_slug_validation? ⇒ Boolean
skip uniq slug validation.
Methods inherited from TermTaxonomy
#children, #in_nav_menu_items, inherited
Methods included from CustomFieldsRead
#add_custom_field_group, #add_custom_field_to_default_group, #get_field_groups, #get_field_object, #get_field_value, #get_field_values, #get_field_values_hash, #get_fields_grouped, #get_fields_object, #get_user_field_groups, #save_field_value, #set_field_value, #set_field_values, #update_field_value
Methods included from Metas
#delete_meta, #delete_option, #fix_save_metas_options_no_changed, #get_meta, #get_option, #options, #save_metas_options, #save_metas_options_skip, #set_meta, #set_metas, #set_option, #set_options
Methods inherited from CamaleonRecord
#cama_build_cache_key, #cama_fetch_cache, #cama_get_cache, #cama_remove_cache, #cama_set_cache
Instance Method Details
#append_menu_item(value) ⇒ Object
add menu item for current menu value: (Hash) is a hash object that contains label, type, link
options for type: post | category | post_type | post_tag | external
sample: “my label”, type: “external”, link: “camaleon.website”, target: ‘_blank’ sample: “my label”, type: “post”, link: 10 sample: “my label”, type: “category”, link: 12 return item created
17 18 19 |
# File 'app/models/camaleon_cms/nav_menu.rb', line 17 def (value) children.create!({ name: value[:label], url: value[:link], kind: value[:type], target: value[:target] }) end |
#skip_slug_validation? ⇒ Boolean
skip uniq slug validation
22 23 24 |
# File 'app/models/camaleon_cms/nav_menu.rb', line 22 def skip_slug_validation? true end |