This is a block of data created by the Relcontent content type.
Data in the block may be assembled from static text (like this) or from the
content type settings form (\$conf) for the content type, or from the context
- that is passed in. <br/>
+ that is passed in. <br />
In our case, the configuration form (\$conf) has just one field, 'config_item_1;
and it's configured with:
");
$block->content .= '<div style="border: 1px solid red;">' . var_export($conf['config_item_1'], TRUE) . '</div>';
}
if (!empty($context)) {
- $block->content .= '<br/>The args ($args) were <div style="border: 1px solid yellow;" >' .
+ $block->content .= '<br />The args ($args) were <div style="border: 1px solid yellow;" >' .
var_export($args, TRUE) . '</div>';
}
- $block->content .= '<br/>And the relcontext context ($context->data->description)
+ $block->content .= '<br />And the relcontext context ($context->data->description)
(which was created from a
simplecontext context) was <div style="border: 1px solid green;" >' .
print_r($context->data->description, TRUE) . '</div>';
This is a block of data created by the Simplecontext content type.
Data in the block may be assembled from static text (like this) or from the
content type settings form (\$conf) for the content type, or from the context
- that is passed in. <br/>
+ that is passed in. <br />
In our case, the configuration form (\$conf) has just one field, 'config_item_1;
and it's configured with:
");
$block->content .= '<div style="border: 1px solid red;">' . print_r($conf['config_item_1'], TRUE) . '</div>';
}
if (!empty($context)) {
- $block->content .= '<br/>The args ($args) were <div style="border: 1px solid yellow;" >' .
+ $block->content .= '<br />The args ($args) were <div style="border: 1px solid yellow;" >' .
var_export($args, TRUE) . '</div>';
}
- $block->content .= '<br/>And the simplecontext context ($context->data->description) was <div style="border: 1px solid green;" >' .
+ $block->content .= '<br />And the simplecontext context ($context->data->description) was <div style="border: 1px solid green;" >' .
print_r($context->data->description, TRUE) . '</div>';
return $block;
}
'css_class' => '',
'title' => 'Simplecontext',
'body' => 'The "Simplecontext" content and content type demonstrate a very basic context and how to display it.
-
+
Simplecontext includes configuration, so it can get info from the config. It can also get its information to run from a simplecontext context, generated either from an arg to the panels page or via explicitly adding a context to the page.',
'format' => '1',
);
if (!$arg) {
$block->content = <<<END
<em>This page is intended to run with an arg and you don\'t have one.</em>
- <br/>
+ <br />
Without an arg, the page doesn\'t have any context.
- <br/>Please try something like "/$arg0/xxx"
+ <br />Please try something like "/$arg0/xxx"
END;
-
+
$block->title = "This is intended to run with an argument";
} else {
$block->content = "The arg for this page is \'$arg\'";
if (isset($context->keyword)) {
$desc .= '<div class="description">' . t('Keyword: %@keyword', array('@keyword' => $context->keyword));
foreach (ctools_context_get_converters('%' . $context->keyword . ':', $context) as $keyword => $title) {
- $desc .= '<br/>' . t('@keyword --> @title', array('@context' => $keyword, '@title' => $title));
+ $desc .= '<br />' . t('@keyword --> @title', array('@context' => $keyword, '@title' => $title));
}
$desc .= '</div>';
$desc .= '<div class="description">' . t('Keyword: %@keyword', array('@keyword' => $argument['keyword']));
if (isset($contexts[ctools_context_id($argument, 'argument')])) {
foreach (ctools_context_get_converters('%' . $argument['keyword'] . ':', $contexts[ctools_context_id($argument, 'argument')]) as $keyword => $title) {
- $desc .= '<br/>' . t('@keyword --> @title', array('@keyword' => $keyword, '@title' => $title));
+ $desc .= '<br />' . t('@keyword --> @title', array('@keyword' => $keyword, '@title' => $title));
}
}
$desc .= '</div>';
if (isset($context['keyword'])) {
$desc .= '<div class="description">' . t('Keyword: %@keyword', array('@keyword' => $context['keyword']));
foreach (ctools_context_get_converters('%' . $context['keyword'] . ':', $contexts[ctools_context_id($context, 'context')]) as $keyword => $title) {
- $desc .= '<br/>' . t('@keyword --> @title', array('@keyword' => $keyword, '@title' => $title));
+ $desc .= '<br />' . t('@keyword --> @title', array('@keyword' => $keyword, '@title' => $title));
}
$desc .= '</div>';
}
if (isset($relationship['keyword'])) {
$desc .= '<div class="description">' . t('Keyword: %@keyword', array('@keyword' => $relationship['keyword']));
foreach (ctools_context_get_converters('%' . $relationship['keyword'] . ':', $contexts[ctools_context_id($relationship, 'relationship')]) as $keyword => $title) {
- $desc .= '<br/>' . t('@keyword --> @title', array('@keyword' => $keyword, '@title' => $title));
+ $desc .= '<br />' . t('@keyword --> @title', array('@keyword' => $keyword, '@title' => $title));
}
$desc .= '</div>';
}