I have a bit of content that is being strung into a site through CiviCRM and would like to print the region directly to the page.tpl.php file to get it into a specific region with PHP - can anyone provide me with what that code would look like as a template?

Thank you!

Comments

nirvana_u’s picture

Hi,

You have to define regions in your theme .info file.
regions[sidebar_first] = First Sidebar
regions[sidebar_second] = Second Sidebar

Then you need to put the relevant template tags in your page.tpl.php file.

For example if you defined the regions sidebar in your themes .info file, you would then add this code to your tpl.php file exactly where you want to place: print render($page['sidebar_first']);

Hope this will help you out. If some more concern then please let me know.

Thanks

drummondf’s picture

I think I've asked the wrong question. I want to write the contents of that div to another region. How can I identify the code that is being used to write the contents and how can I then write it to the new region?

The challenge is that this is being printed via CiviCRM and isn't "block"-able. You can find the segment I need to move here:

   <div id="footer_text" class="crm-section event_footer_text-section">
        <p><p>TEST</p>
</p>
    </div>

The question is can I rewrite the contents of the div via the id or class, and if I did would it know to print the

TEST

?

Ask me about marketing