Questions tagged [octobercms-viewbag]

3 questions
0
votes
1 answer

In Octobercms item.viewBag.cssClass value with more than one classes use if statement with every class separately

In Octobercms Pages Plugin i can insert a CSS Class in menu item attributes. Then i can renter this value in the template using "item.viewBag.cssClass". So i can use: {% if subitem.viewBag.cssClass == 'name' %}
  • {% endif…
    0
    votes
    1 answer

    Access to OctoberCMS page in code?

    I have a Static Page in OctoberCMS named General that has a bunch of site-wide settings including phone number and address. Is it possible to access this page in code to read these settings from its ViewBag? UPDATE: a plugin was created with the…
    0
    votes
    1 answer

    On octobercms static pages plugin render a group of fields with a repeater inside

    On "content/static-pages/index.htm" i can see the saved fields that can be rendered on page: Then on partials i can use {{ data.section_color }} to render a field. Now i want to create a repeater field inside "meta/groups.yaml" like…