Forum for discussing general topics related to Couch.
2 posts Page 1 of 1
Hello,

I have read through the Extended Users tutorial and the Advanced tutorial with NoteJam and I am stuck.

I am trying to create a very simple interface where I can create different users and grant them access to specific pages where they can update their own content.

I am looking to see if anyone has any examples of using the extended user functionality? I don't understand what <cms> tags need to be active in the header to say which user can access which page.

Any help would be appreciated. Thanks
If you have installed a couchified version of NoteJam, navigate to /snippets/views/notes/list_view.html to see howto fetch pages (notes) that belong to currently logged-in user - I am pasting the relevant part right here -
Code: Select all
<cms:pages custom_field="note_owner=<cms:show k_user_name />" orderby=my_sort_field order=my_sort_dir  show_future_entries='1'>
   <tr>
     <td><a href="<cms:route_link 'page_view' rt_id=k_page_id />"><cms:show k_page_title /></a></td>
     <td class="hidden-text date"><cms:date k_page_modification_date format='jS M, Y' /> </td>
   </tr>
   
   <cms:if k_paginated_top >
      <cms:set my_title="All notes (<cms:show k_total_records />)" 'global' />
   </cms:if>
   
   <cms:no_results>
      <tr>
         <td colspan='3'><p>No notes created yet.</p></td>
      </tr>
   </cms:no_results>
</cms:pages>


The most important is to explicitly provide the related owner (which is the currently logged user) - custom_field="note_owner=<cms:show k_user_name />"

I think there is no any other example, because notejam is an example (maybe unnecessarily complicated sometimes). If you find it too advanced for the moment, there is always a helping hand to couchify your designs.
2 posts Page 1 of 1
cron