Jump to content

Display content cms page on footer page


@rthur
 Share

Recommended Posts

Hi,

I'm trying to display a cms content before my footer. This content must only display if the category page is 10 or 25.

I'm not sure the proper way to do it.

I tried this :

{if $category.id == 10 OR $category.id == 25}
  {assign var=cms_content value=CMS::getCMSContent(16, true, true)}
     <div class="contentCms">
       {$cms_content.content}
     </div>
{/if}

The issue is that it displays the raw html content (see attached). How can I display the code in html format?

Thanks

Prestashop 1.7.4.3

Capture d’écran 2020-12-23 à 12.09.28.png

Edited by @rthur (see edit history)

Share this post


Link to post
Share on other sites

  • 4 weeks later...
On 12/23/2020 at 7:27 AM, @rthur said:

Hi,

I'm trying to display a cms content before my footer. This content must only display if the category page is 10 or 25.

I'm not sure the proper way to do it.

I tried this :

{if $category.id == 10 OR $category.id == 25}
  {assign var=cms_content value=CMS::getCMSContent(16, true, true)}
     <div class="contentCms">
       {$cms_content.content}
     </div>
{/if}

The issue is that it displays the raw html content (see attached). How can I display the code in html format?

Thanks

Prestashop 1.7.4.3

Capture d’écran 2020-12-23 à 12.09.28.png

Please can you give me the path of the file to edit (.tpl)

Share this post


Link to post
Share on other sites

  • 10 months later...

Hi,

I display CMS content in a product page within a popup but the different translations are not retrieved when I change the language and it always displays the translation of the first language defined.

 

    {if $smarty.get.id_product == 27}
     {assign var=cms_content value=CMS::getCMSContent(7, true, true)}
     <div id="productInfoModal" class="modal fade">
      <div class="modal-dialog" role="document"><!-- Modal content-->
        <div class="modal-content">
          <button type="button" class="close" data-dismiss="modal" aria-label="Fermer">
            <span aria-hiddens="true">×</span>
          </button>
          <div class="contentCms modal-body">
            {$cms_content.content nofilter}
          </div>
        </div>
      </div>
    </div>
    {/if}


How to display existing translations when changing the language?

Thanks

Prestashop 1.7.6.3

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More