Oh, I forgot. The section of the site where the products are going to be listed will be available only after logging in. So, the task is to capture the current user and make so that he/she will see only those items, that are related to him/her. Is it possible?
I enabled Debug template and captured the template name used in the Admin/MyAccount/Drafts. It is design/admin/templates/content/draft.tpl. But it makes no use for me because the template uses a special function, like this:
{let draft_list=fetch('content','draft_version_list',hash(limit,$page_limit,offset,$view_parameters.offset))}
{section show=$draft_list}
... etc.
Hi! This isn't quite an answer to your question, but might be usefull anyway...
If a user is allowed to read only some nodes within a tree, a fetch( 'content', 'tree',
hash( 'parent_node_id', $your_rootnode) will return all the elements the user is allowed to read under $your_rootnode even if he is not allowed to read $your_rootnode.
So if using the role system is an alternative, this might be a solution.
Or you can just fetch all the nodes, loop through them and only show them {if eq($user.contentobject_id, $node.data_map.<...>.your_related_object.contentobject_id)}
<i>Or you can just fetch all the nodes, loop through them and only show them</i>
This will a less efficient when you have thousand of nodes. I suggest to create template operator where one of parameters will be user_id and which will return sql result array for example. All data are stored in database. Look in to documentation how to create template operator.
I have (had) somehow the same problem and I solved it by the method described by Tore Jørgensen. But just like Lukasz warned, when the number of nodes increases, speed response awfully drops.
Will the search function help in this case ? Or what is the syntax to use if I plan to use the "attribute_filter" parameter ?