How to change the display of a paragraph bundle using a custom module?

by blu   Last Updated January 05, 2018 15:07 PM

I have created a paragraph bundle with text fields that ask for social media accounts(facebook account name, youtube account name, twitter account name) Then a custom module will grab that account name and then return the latest feeds for that account.

I created a new template file for the paragraph bundle called paragraphs-item--custom_feed.tpl.php

From this template file I call the functions i created in my custom module but I realize that this works only if i'm signed in as an admin. If I view the page without being an admin then nothing appears where that bundle should be.

<div class="<?php print $classes; ?>"<?php print $attributes; ?>>
  <div class="content"<?php print $content_attributes; ?>>
    <?php print my_module($content['field_youtube'][0]['#markup']); ?>    
  </div>
</div>


Related Questions



Paragraphs + selectlist based bg-color

Updated November 06, 2017 20:07 PM

How to render field from nested paragraph in twig

Updated January 16, 2018 02:07 AM