Borrar

General discussion about the Wapka ecosystem. Discussion of specific Wapka-related services usually belongs in other sections.
Post Reply
User avatar
Xkria-uy
Posts: 122
Joined: Fri Apr 07, 2023 9:27 pm
Location: Uruguay
Contact:

Borrar

Post 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?
User avatar
francisco
Posts: 62
Joined: Tue Mar 07, 2023 1:48 pm
Location: Brazil
Contact:

Re: Borrar

Post 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.
😴
User avatar
Xkria-uy
Posts: 122
Joined: Fri Apr 07, 2023 9:27 pm
Location: Uruguay
Contact:

Re: Borrar

Post 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.
User avatar
Xkria-uy
Posts: 122
Joined: Fri Apr 07, 2023 9:27 pm
Location: Uruguay
Contact:

Re: Borrar

Post by Xkria-uy »

Funciona excelente, muchas gracias maestro Francisco.
Hariph
Posts: 45
Joined: Tue May 23, 2023 9:33 pm

Re: Borrar

Post by Hariph »

Please write the full code (for api data lister) write the complete code for creating and listing
Post Reply