Hi James,
Now I know where is the problem, I'll try to explain it better. Yesterday's post is not very clear, i'm sorry
In header.tpl I have written code that shows the masthead membership:
- Code: Select all
{foreach from=$groups item=group}
<b>{$group->getGroupTitle()}</b>
{assign var=groupId value=$group->getGroupId()}
{assign var=members value=$teamInfo[$groupId]}
<br>
{foreach from=$members item=member}
{assign var=user value=$member->getUser()}
<a href="javascript:openRTWindow('{url op="../about/editorialTeamBio" path=$user->getUserId()}')">
{$user->getFullName()|escape}</a><br>
{if $user->getAffiliation()}<i> {$user->getAffiliation()|escape}</i><br><br>{/if}
{/foreach}
{/foreach}
To do that I've modified the classes/template/TemplateManager.inc.php and added the necessary variables in the constructor and the function editorialTeamBio($args).
Now, the problem I have is that in userProfile.tpl from templates/manager/people/ or templates/sectionEditor, I firstly include header.tpl and after this "calling" the variable $user is not the right one but it's always the same user, which is the last user that is found on the header-code foreach's.I've fixed this adding the following code to the header.tpl:
- Code: Select all
<!-- Save user -->
{if $user}
{assign var="usuari" value=$user}
{/if}
(...) -> foreach's code
<!--Retrieve user-->
{if $usuari}
{assign var=user value=$usuari}
{/if}
But I guess this is not the best way. Is there a way to avoid this saving/retrieving user code, please??
Another problem I have found related to this, is that the header.tpl code for showing the masthead membership
is always working except when in Mashtead section of the Management Pages. There, the page stalls on that header.tpl code, getting this error on the Apache's Log:
PHP Fatal error: Call to undefined method GroupDAO::getGroupTitle() in /var/www/htdocs/ojs-2.2/cache/t_compile/%%32^32D^32D13D85%%header.tpl.php on line 163, referer:
http://...
Thanks again,
Sergi Villanueva.