backdrop-contrib / paragraphs

Paragraphs module to control your content flow
https://backdropcms.org/project/paragraphs
GNU General Public License v2.0
5 stars 11 forks source link

Hiding and rendering content in .tpl #37

Closed laryn closed 4 years ago

laryn commented 5 years ago

From the Backdrop Forum:

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?

laryn commented 5 years ago

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 fact, I can't get any changes in the paragraphs-item.tpl.php to get picked up at all in Drupal 7. I think this is where we at least got that far in Backdrop. Now we may need to figure out why the render/hide functions aren't working as expected in the tpl...

herbdool commented 5 years ago

It worked for me in Drupal 7. I haven't tried in Backdrop but that template should be there in the module itself. And you can turn on theme debug to check which templates are suggested.

laryn commented 4 years ago

Cross-posted in the forum:

@MartinL -- are you up for doing some testing? You'll need: