Hi Bartek,

Yes, you can access your content items from a page template script. You don't 
necessarily need a component.

Here's how you would get all tours from our demo Tours app (tours workspace) 
and render their names in a page template.

[code]
[#assign myTours = cmsfn.contentByPath("/magnolia-travels", "tours")]

<ul>
  [#list cmsfn.children(myTours, "mgnl:content") as child ]
  <li>${child.name!}</li>
  [/#list]
</ul>
[/code]

Docs that may help:
https://documentation.magnolia-cms.com/display/DOCS/cmsfn
https://documentation.magnolia-cms.com/display/DOCS/Hello+Magnolia (You can 
stop after "Creating a page template")

--Antti

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=33416a74-a2f3-4b0a-8040-156cb21982e5


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <user-list-unsubscr...@magnolia-cms.com>
----------------------------------------------------------------

Reply via email to