Page 1 of 1

Borrar

Posted: Tue Jun 13, 2023 4:07 pm
by Xkria-uy
<br> {{VAR(USER_ROLE)@IFEQ(Super Admin)@THEN(<a href="/delete/data/%id%">Borrar</a>)@ELSE()}} esto funciona en API data lister. Para file lister y Post lister?

Re: Borrar

Posted: Tue Jun 13, 2023 9:15 pm
by francisco
  • For File Lister: /delete/file/%id%
  • For Post Lister: /delete/post/%id%
I would recommend you to use the %delete% tag instead of the hardcoded URL, to avoid disruption to your site if the URL changes in the future.

Code: Select all

{{VAR(USER_ROLE)@IFEQ(Super Admin)@THEN(<a href="%delete%">Borrar</a>)@ELSE()}}
Also keep in mind that even if you are configuring the link to only be displayed to Super Admins, the user who created/uploaded the resource can type the URL into the browser and be able to delete the resource.

Re: Borrar

Posted: Wed Jun 14, 2023 1:05 am
by Xkria-uy
francisco wrote: Tue Jun 13, 2023 9:15 pm
  • For File Lister: /delete/file/%id%
  • For Post Lister: /delete/post/%id%
I would recommend you to use the %delete% tag instead of the hardcoded URL, to avoid disruption to your site if the URL changes in the future.

Code: Select all

{{VAR(USER_ROLE)@IFEQ(Super Admin)@THEN(<a href="%delete%">Borrar</a>)@ELSE()}}
Also keep in mind that even if you are configuring the link to only be displayed to Super Admins, the user
francisco wrote: Tue Jun 13, 2023 9:15 pm
  • For File Lister: /delete/file/%id%
  • For Post Lister: /delete/post/%id%
I would recommend you to use the %delete% tag instead of the hardcoded URL, to avoid disruption to your site if the URL changes in the future.

Code: Select all

{{VAR(USER_ROLE)@IFEQ(Super Admin)@THEN(<a href="%delete%">Borrar</a>)@ELSE()}}
excelente, muchas gracias.

Also keep in mind that even if you are configuring the link to only be displayed to Super Admins, the user who created/uploaded the resource can type the URL into the browser and be able to delete the resource.
who created/uploaded the resource can type the URL into the browser and be able to delete the resource.

Re: Borrar

Posted: Wed Jun 14, 2023 11:49 pm
by Xkria-uy
Funciona excelente, muchas gracias maestro Francisco.

Re: Borrar

Posted: Wed Feb 07, 2024 10:32 am
by Hariph
Please write the full code (for api data lister) write the complete code for creating and listing