Having failed to crack this nut after after repeated attempts over the past couple years I’m back to try yet again. In short, I have things working about 99% the way I want but I’m struggling with one finicky aspect.
ownpagesonly I’m able to show the
NpEditThisButton only for articles written by the respective user (creator) when that particular user is signed-in. For example, in a “members only” folder (container) the user is shown a listing of only their articles, each entry with its own edit button. Alternatively, when viewing the public-facing article (resource) the edit button is also shown, but only if/when the user is signed-in. So far, so good.
The problem is on one specific public-facing page where a listing shows all the articles for all users using
pdoResources/pdoPage. In this case the edit button is only shown for signed-in Admin users, except that it shows an edit button for all articles written by everyone, Admin and members alike.
Conversely, when a Member is signed-in no edit buttons are shown on the page, not even for articles they created.
Keep in mind this oddity only happens on this one particular page, everywhere else an edit button is displayed, be it on a public-facing page or a specific “member only” page everything works as expected for the respective signed-in user, be they Admin or Member. Why it doesn’t work on this one page has me baffled beyond reason.
Here is the
pdoPage/Resources call in the Resource template:
[[!pdoPage@pdoPagination? &elementClass=`modSnippet` &element=`pdoResources` &tpl=`Category Article Row` &hideContainers=`1` &pageVarKey=`page` &parents=`[[*id]]` &includeTVs=`1` &includeContent=`1` &limit=`6` &pageLimit=`5` &pageNavVar=`page.nav` ]]
And in the
&tpl Chunk (above) I have the
[[!NpEditThisButton? &np_id=`9` &np_edit_id=`[[+id]]` &ownpagesonly=`1` ]]
Any insight would sure be appreciated.