PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, October 26, 2022

[FIXED] How to render a link in prestashop 1.7 with Apollo page builder

 October 26, 2022     prestashop-1.7, smarty     No comments   

Issue

Im developing a e-commerce in prestashop and it's using Apollo Page builder to template it.

In the product page (Ap Products Details Builder) i want to add a link to a cms page.

Here's what i've tried:

  1. Ap PageBuilder -> Ap Products Details Builder -> detail2556437236 -> Edit

    On the builder, dragged block tpl code inside the template and added: {url entity='cms' id=6 id_lang='1'}

  2. In the file detail2556437236.tpl added:

    {url entity='cms' id=10 id_lang=2}
    
  3. In the file detail2556437236.tpl added:

    <a href=""></a>
    

On every try, nothing appears in the elements neither errors on console. It seems like it's not even getting called


Solution

Ok i realized that content wasn't appearing because of some weird cache.

Beside that i had something wrong. On tpl code block it still needs to have the anchor tag:

<a href="{url entity='cms' id=6}">text</a>

and now it works fine as a charm

But the @KrystianPodemski answer also works, with 1 minus.

If the page is no debug mode, it will show a redirect page instead.



Answered By - Joel Filipe Proença Rodrigues
Answer Checked By - Katrina (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing