thitami
thitami

Reputation: 838

How to display all the contents of a category in pyrocms page type

I am working on a Portfolio module with PyroCMS I am stuck in the following point and got no helpful answer so far on the CMS's forum :

I am having a Categories stream, which have been assigned some Projects against them.

So, I am managing to loop and display the title entries from the Categories stream within the appropriate Page Type, using the following "pattern":

{{ streams:cycle stream="categories" }}

{{ entries }} {{ id }} {{ /entries }}

{{ /streams:cycle }}

at the moment, unsuccessfully. Note that I have assigned the Categories stream to the specific Page Type, when I have created it.

I have tested {{ total }} and it also returns 0.

I do not consider myself as completely familiar with Streams and Page Types, therefore any help would be appreciated.

Upvotes: 0

Views: 1244

Answers (1)

Patcouch22
Patcouch22

Reputation: 912

After looking into a bit more your syntax is correct. However, like to speculated you will need pyrostreams in order use the stream tags. The other way you could do this would be to write a custom plugin to give you the data you need.

The following post might give you some ideas on how to accomplish what you want with a plugin: https://forum.pyrocms.com/discussion/20253/looping-certain-data-in-plugins

Upvotes: 1

Related Questions