Hi there,
Is there a way to show the count (number) of relations in a one to many relation mode
Thanks in advance,
Bert
Is there a way to show the count (number) of relations in a one to many relation mode
Thanks in advance,
Bert
bertdepoortere wrote: Hi there,
Is there a way to show the count (number) of relations in a one to many relation mode
Thanks in advance,
Bert
<cms:template title='dates' clonable='1'>
<cms:editable name='related_users' type='relation' masterpage='users/index.php' />
<cms:editable name='related_project' type='relation' masterpage='projects.php' has='one' />
<cms:editable name='date' type='text' />
...
</cms:template>
<cms:template title='projects' clonable='1'>
...
</cms:template>
<body>
<cms:reverse_related_pages masterpage='dates.php'>
<cms:show date /> - <cms:show count-of-related-users />
<!-- I want to show the number of users that are related with a date -->
</cms:reverse_related_pages>
</body>
<cms:reverse_related_pages masterpage='dates.php'>
<cms:show date /> -
<!-- I want to show the number of users that are related with a date -->
No. of users: <cms:related_pages masterpage='users/index.php' count_only='1' />
</cms:reverse_related_pages>
<cms:reverse_related_pages masterpage='dates.php'>
<cms:show date /> -
<!-- I want to show the number of users that are related with a date -->
No. of users: <cms:related_pages 'related_users' count_only='1' />
</cms:reverse_related_pages>
KK wrote: Following code should work as expected -
- Code: Select all
<cms:reverse_related_pages masterpage='dates.php'>
<cms:show date /> -
<!-- I want to show the number of users that are related with a date -->
No. of users: <cms:related_pages 'related_users' count_only='1' />
</cms:reverse_related_pages>
Hope this helps.