Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
On my site i have a custom rule (with rules module) that flags recently viewed content by user (anonymous too).
The rule fires on the event "content is viewed" and then with flags module (and session api for anonymous) flags the node with the current user.
Is there a way to make this rule working with authcache?
Thank you
Comments
Comment #2
salvatore_severo CreditAttribution: salvatore_severo as a volunteer commentedComment #3
znerol CreditAttribution: znerol commentedIt really depends on the use case. What is the exact purpose of the flag? What do you do with the data?
Do you want to simply display a list of pages one user has visited? If that is the case, you might want to build a pure JavaScript based approach. E.g. store the page title and the current document location into browser local storage and then render the last 5 entries into a block.
Otherwise, if you require the data stored on the server, you might probably need to add a custom Authcache Fragment. See the various submodules for examples.
Comment #4
znerol CreditAttribution: znerol commentedComment #5
znerol CreditAttribution: znerol commented