1

im trying to render/display a breadcrumb in a mini panel using both with text format 'PHP code' and 'Display suite code' but it display nothing. it works when i tried with common php code;

<?php echo date("Y"); ?>

but when i tried with

 <?php print render($breadcrumb); ?>

nothing is displayed. and

<?php var_dump($breadcrumb); ?>

return NULL. meaning it cant read drupal variable right? any workaround for this?

1

First thing is this its not a good practice to write the php code in CKeditor because it impact the execution of page and increase the page load time. So it would be better to create the specific page tpl and and render all the drupal variable there.

Reason :: Why its not rendering the drupal in CKeditor because after the complete page load its execute the content section of CKeditor and at that page has not page drupal variable (now page has only html content).

Thanks

1
  • yes, please do not use php in CKeditor, instead use template files for that. For more info on template files please see my answer here
    – No Sssweat
    Sep 18 '15 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.