0
Welcome Guest! Login
0 items Join Now

SOLVED Read/unread Articles, get current user ID

  • SOLVED Read/unread Articles, get current user ID

    Posted 1 month 2 weeks ago
    • I am trying to create my own atom. All I need is to mark with "read / unread" when the current user has already read (or not) an article. For that I will have to connect to the database and save each article read by the user, and for that I need to know the user's id. The problem is that I have tried to use the Joomla documentation to get the user id, but there is no way I can get it. How can I access the userid from my twig file? I have tried this documentation but have not succeeded on my own: docs.joomla.org/Accessing_the_current_user_object

      I would prefer to buy a tool that does this action, but there is nothing like it, if you help me do it, I will share it with the community.

      Regards, Matías.
    • Matias Cariboni
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 92737
    • Thanks: 12186
    • Web Designer/Developer

    Re: SOLVED Read/unread Articles, get current user ID

    Posted 1 month 2 weeks ago
    • What template are you using? Have a look at the TWIG file for the popupmodule particle as that will give you the answer how to access user details as it has to do the same.

      Regards, Mark.
    • The following users have thanked you: Matias Cariboni

    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: SOLVED Read/unread Articles, get current user ID

    Posted 1 month 2 weeks ago
    • Hi Mark!

      I bought Supra a few months ago. And since I didn't know anything about Joomla or Gantry, I have studied a lot so far to build an online course platform. The project is going fine, but I haven't found a way to mark the joomla articles (the classes in each course) as "read". Thanks for your advice, I'll review it and tell you how I'm doing with this.

      Greetings, Matías.
    • Matias Cariboni

Time to create page: 0.100 seconds