Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
hello all.

I have multiple users feeding data through a databound form. I want to be able to display the monthly entries created by a user.

I have the following code:
Code: Select all
<cms:archives masterpage="student.php" type="monthly" limit="1">
    <cms:pages masterpage=k_user_template id=k_user_id order='asc' start_on=k_archive_date stop_before=k_next_archive_date>
        <cms:reverse_related_pages 'created_by' masterpage='student.php' >
            <cms:show k_page_title /><br>
        </cms:reverse_related_pages>
    </cms:pages>
</cms:archives>


There is no output. But if i remove:
Code: Select all
start_on=k_archive_date stop_before=k_next_archive_date

It displays the k_page_title.

The scenario: Lets assume 2 people are entering data after logging in, into the webapp. Each person makes a number of entries. When the entry is created, I make sure to log the person creating that entry by using a relation as:
Code: Select all
<cms:editable name="created_by" label="User creating the Student Entry" type="relation" masterpage="users/index.php" has="one" order="46" />


Now when the person is logged in I want the person to be able to see how many entries he/she has made in a particular month.

Regards,
GenXCoders
Image
where innovation meets technology
The way to display the count of the posts (as in my case) is:

the person to be able to see how many entries he/she has made in a particular month.

Code: Select all
<cms:archives masterpage="student.php" type="monthly">
    <cms:pages masterpage=k_user_template id=k_user_id limit='1' >
        <cms:reverse_related_pages 'created_by' masterpage="student.php" limit="1" start_on=k_archive_date stop_before=k_next_archive_date>
            <cms:date k_archive_date format="M Y" />
            <cms:show k_total_records />
        </cms:reverse_related_pages>
    </cms:pages>
</cms:archives>


While for the daily count one can just change the type as:
From
Code: Select all
<cms:archives masterpage="student.php" type="monthly">

To
Code: Select all
<cms:archives masterpage="student.php" type="daily">


Regards,
GenXCoders
Image
where innovation meets technology
2 posts Page 1 of 1
cron