I'm working on Oracle Rightnow and i have to create a custom widget. I want to try with a die(); on him but it never dies. How can I interrupt the widget to see a variable value?
<? $reportColumns = count($this->data['reportData']['headers']);
foreach ($this->data['reportData']['data'] as $value):
die(var_dump($value));?>
<rn:block id="resultListItem">
<li>
<? for ($i = 0; $i < $reportColumns; $i++): ?>
<? $header = $this->data['reportData']['headers'][$i]; ?>
<? if ($this->showColumn($value[$i], $header)):
if ($i < 3):
if ($i === 0): ?>
<div class="rn_Element<?=$i + 1?>"><h3><?=$value[$i];?></h3></div>
<? else: ?>
<span class="rn_Element<?=$i + 1?>"><?=$value[$i];?></span>
<? endif; ?>
<? else: ?>
<span class="rn_ElementsHeader"><?=$this->getHeader($header);?></span>
<span class="rn_ElementsData"><?=$value[$i];?></span>
<? endif; ?>
<? endif; ?>
<? endfor; ?>
</li>
</rn:block>
<? endforeach; ?>
Are you sure that die isn't working? If you view source, is the HTML broken where you at the point where you called exit? If you exit from your view, then HTML would still be returned to the browser and rendered from elements that were created prior to the widget's construction.
You may try exit instead of die, but I think you'll get the same result.
However, the easier way to print the values of your array would be to do it from your widget's controller and exit the process there.