This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hi. I have page with several subpages. All pages created in Rainlab Static Page plugin and each of them has variable: {variable name="thumb1" label="Thumbnail 1" tab="Image" type="mediafinder" mode="image"}{/variable}
I need on home page for each page list the images. Do you know how to do it?
Structure: Homepage Projects
- Project name 1
- Project name 2
- ...
- Project name N
Thanks
Last updated
Read this forum post:
https://octobercms.com/forum/post/list-of-static-pages-for-templating
And check the RainLab Pages PageList class
mjauvin said:
Read this forum post:
https://octobercms.com/forum/post/list-of-static-pages-for-templating
And check the RainLab Pages PageList class
Thanks for quick reply. As I know, this class I can use only for listing page titles and urls? Am I able to list variable of page? If yes, how?
Yes, just use the field name on the page object as below:
title = "Home"
url = "/"
layout = "staticLayout"
==
function onInit()
{
$theme = \Cms\Classes\Theme::getActiveTheme();
$this['pages'] = \RainLab\Pages\Classes\Page::listInTheme($theme, true);
}
==
{% for page in pages %}
{{ page.mySyntaxField }}
{% endfor %}
grigkar said:cookie clicker
mjauvin said:
Read this forum post:
https://octobercms.com/forum/post/list-of-static-pages-for-templating
And check the RainLab Pages PageList class
Thanks for quick reply. As I know, this class I can use only for listing page titles and urls? Am I able to list variable of page? If yes, how? Your can able to list variable of page
mjauvin said: https://bubbleshooterfun.de
Read this forum post:
https://octobercms.com/forum/post/list-of-static-pages-for-templating
And check the RainLab Pages PageList class
Thank you for sharing this article with us.
1-8 of 8