Template params are not passing in template - Joomla! Forum - community, help and support
i took on site previous developer created client. client want's able change things via template, here have done enable that.
first, had add correct fields in templatedetails.xml file. easy. then, went index.php file , added
in header , added
to test it, , came nothing. (yes, option1 input in template , saved. shows on backend.)
so, seeing can not communicate params. further test this, wanted print out of params, modified top code , added
and output
thus showing template not communicating params. or ideas why?
*edit: checked other templates, beez5, , don't pull properly. ugh. re-installing 2.5.7 currently.
first, had add correct fields in templatedetails.xml file. easy. then, went index.php file , added
code: select all
jhtml::_('behavior.framework', true);
// params
$option1 = $this->params->get('option1');
$app = jfactory::getapplication();
$doc = jfactory::getdocument();
$templateparams = $app->gettemplate(true)->params;in header , added
code: select all
<?php echo $option1; ?>
<?php echo htmlspecialchars($option1); ?>to test it, , came nothing. (yes, option1 input in template , saved. shows on backend.)
so, seeing can not communicate params. further test this, wanted print out of params, modified top code , added
code: select all
echo "<pre>"; print_r($templateparams); echo "</pre>"; die();and output
code: select all
jregistry object
(
[data:protected] => stdclass object
(
)
)thus showing template not communicating params. or ideas why?
*edit: checked other templates, beez5, , don't pull properly. ugh. re-installing 2.5.7 currently.
solved. testing using urls like
index.php?template=beez5
for testing, doesn't work well.
we doing , not applying template. side note, nice have kind of url places template in there can access params, without forcing site use template naturally.
phew
index.php?template=beez5
for testing, doesn't work well.
we doing , not applying template. side note, nice have kind of url places template in there can access params, without forcing site use template naturally.
phew
Comments
Post a Comment