I'm trying to render fields in paragraphs-item--bundlename.tpl.php like it's shown in the description:

<?php print render($content['field_example']); ?>

When I go and check it in the frontend, then I see the "site under maintenance" message. Only for the link I was trying if it is working. 

Is it a bug or am I doing something wrong?

Thanks for your help. 

Martin

 

BTW: I learned to know Backdrop CMS 2 days ago and yes I'm already loving it. I'm already using it for a small project to develop. For me it's a valuable alternativ for Drupal 8, which is for small clients an overkill and to time-consuming. 

Comments

Hi MartinL and welcome to Backdrop! I'll try to test this out soon. There are a few bugs in the Paragraphs port and I'm trying to iron them out (help welcome). If I confirm this I'll open an issue in the Paragraphs Issue queue.

Hello laryn, thank you. I appreciate.

Martin

 

@MartinL have you ever done this successfully in the Drupal 7 version? I am just doing some testing and I am not having success there. I am trying to narrow down if this is a porting-to-Backdrop issue or a module issue that was inherited from D7.

In Drupal 7 I was never working with the Paragraph-Module. I started to use it in my last Drupal 8 sites and thought that it would be nice also in Backdrop. 

So I can't tell you if it is working in D7. 

@laryin: I made a quick test on Drupal 7 and it works. 

Okay, thanks. I will rebuild a D7 local install to do a test. If you get a chance to type the steps you followed here I'll follow your recipe exactly on D7 and then on Backdrop.

  1. I created a local server and database with MAMP Pro (PHP 7.2 if it matters)
  2. Downloading and installing D7 7.67 by hand (not Drush)
  3. Downloading Entity API 1.9 & Paragraphs 1.0-rc5
  4. Installing Paragraphs, Paragraphs Bundle Permissions and Entity API also by hand
  5. Installing Bootstrap Theme (only for getting another theme as delivered)
  6. Adding a Bundle called Text with the fields
    1. Title (field_title)
    2. Body (field_body)
  7. Adding the paragraph-field (field_paragraphs) to content type "Basic Page"
  8. Create a basic test-page and adding some paragraph-content
  9. Copy from the file "paragraph-item.tpl.php" from the directory "sites/all/modules/paragraphs/theme" to "site/all/themes/bootstrap/templates
  10. renaming the file to "paragraphs-item--text.tpl.php"
  11. and making the following changes to the file
    <h1><?php print render($content['field_title']); ?></h1>
    <?php print render($content['field_body']); ?>

instead of 

<?php print render(content);?>

here the result

 

here the screenshot from the setup

 

Thanks MartinL -- I can replicate on Drupal 7 and it's on my list to figure out why it's not working in Backdrop yet. Hopefully this week if I'm lucky.