Do any one has any idea from where the below $ isUserLoggedInor $hideRegisterLink variable is fetching its data? The code is from navar.tpl in OJS http://pkp.sfu.ca/?q=ojs.
Note:OJS uses smarty templating
{if $isUserLoggedIn}
<li id="userHome"><a href="{url page="user"}">
{translate key="navigation.userHome"}</a></li>
{else}
<li id="login"><a href="{url page="login"}">
{translate key="navigation.login"}</a></li>
{if !$hideRegisterLink}
<li id="register">
<a href="{url page="user" op="register"}">
{translate key="navigation.register"}</a></li>
{/if}
{/if}{* $isUserLoggedIn *}
If anyone is interested other than me,Its coming from pre-defined variable from OJS it self.you can visit this page for more info http://pkp.sfu.ca/ojs/docs/technicalreference/2.1/userInterfaceVariables.html
This will depend on which variable specifically you're interested in. For $isUserLoggedIn, it's lib/pkp/classes/template/PKPTemplateManager.inc.php (as with many other globally-useful variables that are used in several of PKP's applications); in the case of $hideRegisterLink, it's classes/template/TemplateManager.inc.php (the same, but specific to the OJS application).
You can typically find this by grepping, e.g.:
grep -l -e "'hideRegisterLink'" `find . -name \*.inc.php`
There are many other more specific cases, e.g. when a template is only used in a single page (examples can be found in pages/, which corresponds to the View in MVC terminology) or when it appears in a plugin (see plugins/ for examples).