How to Create Panel and Snippets in Interspire
How
to create Panel and snippets in Interspire only 3 Steps
Step 1. Create php file Cat.php in
include/display/Cat.php and copy the hole code and pasted on it
<?php
//$GLOBALS['MyPlaceholder'] = "This
is some bharat <b>text</b> to show";
CLASS ISC_Cat_PANEL extends PANEL
{
function SetPanelSettings()
{
$GLOBALS['Category']
= "Sony";
This %%GLOBAL_Category%% syntex to
define global variable put on Cat.html file which is belong to
panel directory in default then Panel being dynamic.. you can put in
snippets also ...accoding to req.
// we can using a text or
image-based logo?
$test="i love Sony Mobile";
$test .=
$GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("Cat");
I I
In GetSnippet("Cat"); Cat is the snippets name we can render
to dynamic snippets
//$GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("T");
//$GLOBALS['SNIPPETS']['Test'] =
$output;
$GLOBALS['SNIPPETS']['Cat'] = $test;
}
}
?>
Step 2. create panel Cat.html
in panel folder template/default/panel/ and call as below
%%GLOBAL_Category%% (display Sony )
<div>
%%SNIPPET_Cat%% (display snippets
values)
</div>
Step 3. Create snippets
Cat.html in Snipprts folder template/default/snippets/
and paste
<div>
%%SNIPPET_Cat%% or %%GLOBAL_Category%% (display Sony )
whatever u want .....
</div>
Note:-1. Panel have to display Content but snippets have to recursive content like in panel
2. You must be put panel 's html file in default folder of panel similarly for snippets
Comments
Post a Comment