This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

otemu18898
otemu18898

Hi,

Just started using OctoberCMS, looks clean and sleek :) I am using the static pages plug-in, I wanted to have a partial that lists all the contents of a group of sub static pages, currently listing title and url can be done like this:

            {% if someMenu.menuItems %}
                <ul class="menu-links">
                    {% for item in someMenu.menuItems %}
                        {% if item.items %}
                            {% for childItem in item.items %}
                                <li class="{{ childItem.isActive ? 'active' : '' }}">
                                    <a href="{{ childItem.url }}">{{ childItem.title }}</a>
                                </li>
                            {% endfor %}
                        {% endif %}
                    {% endfor %}
                </ul>
            {% endif %}

But nothing to get all the marktup stored in them static pages such as {{ childItem.content }} I just wondered if anyone knew how to list the code in them pages? as someMenu.menuItems does not have this data, the "staticPage" object also didn't seem to have any method where I could grab the array of subpages.content.

Any help appreciated.

Thanks

Last updated

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.