Add to Favourites


(Tslater) #1

Hi everyone,


I'm exploring the possibility of having an "add to favourites"/wishlist functionality, where the current page can be "bookmarked", and then brought up in a favourites list later, with active links to the page, etc.



In the first instance, we will require the user to login, so I can use a unique user id to store the favourites. Later, it may be necessary for public content to be bookmarked also, but let's keep it simple for starters.



Looking at our out of the box installation, there is no easy way to do this that I can see. Using other CMS, I would simply create a custom table, and include a code snippet in the submit button of a form to insert/update the favourites for that user id.



I think I need a custom form (that I can nest into all pages that can be favourited), with either a Call REST Resource or Make SOAP Call submission action.



This is where I get stuck.



From my reading, I think I need to have a custom web app to process/recieve the SOAP or REST calls, with its own database, etc. (apologies if I am using the incorrect terminology, because I've never had to build server side stuff like this before).



Just wondered if anyone had implemented this, and could point me in the right direction.



Many thanks,

Tys.


(Nic Hubbard) #2

If you want to allow logged in users to "bookmark" pages, then you could just link those pages under their user asset using a trigger or the JS API. Then, you could easily have an asset listing that uses the current user as a root node, which would allow you to list all of the pages that they "bookmarked".


(Tslater) #3

[quote]
If you want to allow logged in users to "bookmark" pages, then you could just link those pages under their user asset using a trigger or the JS API. Then, you could easily have an asset listing that uses the current user as a root node, which would allow you to list all of the pages that they "bookmarked".

[/quote]



Hi Nic,



That looks interesting… I've never seen my own user page. How do I view that (is there a standard URL)? The users folder is locked to me, and it's very likely that the users' pages are inaccessible for public viewing.



If I can't access user pages, potentially using the JS API and the technique of linking pages as children, I could create a page per user and link the bookmarked pages under that. The only thing would be then to limit access to that page to only the user who I created the page for.



Definitely food for thought. Thanks!


(Greg Sherwood) #4

You can also try the access history design area: http://manuals.matrix.squizsuite.net/designs/chapters/access-history-design-area


You can configure it so users manually add a page to the list, essentially providing a custom list of bookmarks.


(Nic Hubbard) #5

[quote]
Hi Nic,



That looks interesting… I've never seen my own user page. How do I view that (is there a standard URL)? The users folder is locked to me, and it's very likely that the users' pages are inaccessible for public viewing.

[/quote]



Yeah, users won't have a URL unless you give the Users folder a URL.