OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



displaying both cover image & TOC on home page..?

Are you an Editor, Author, or Journal Manager in need of help? Want to talk to us about workflow issues? This is your forum.

Moderators: jmacgreg, michael, vgabler, John

Forum rules
This forum is meant for general questions about the usability of OJS from an everyday user's perspective: journal managers, authors, and editors are welcome to post questions here, as are librarians and other support staff. We welcome general questions about the role of OJS and how the workflow works, as well as specific function- or user-related questions.

What to do if you have general, workflow or usability questions about OJS:

1. Read the documentation. We've written documentation to cover from OJS basics to system administration and code development, and we encourage you to read it.

2. take a look at the tutorials. We will continue to add tutorials covering OJS basics as time goes on.

3. Post a question. Questions are always welcome here, but if it's a technical question you should probably post to the OJS Technical Support subforum; if you have a development question, try the OJS Development subforum.

Re: displaying both cover image & TOC on home page..?

Postby asmecher » Wed May 29, 2013 8:58 am

Hi Pangur,

The above is an example; if you drop that into your template code, then anything inside the "if" statement (e.g. anything you put just after the "{* Journal-specific behavior here *}" comment) will only be displayed for the journal with the path "someJournalPath". (Journal paths are set in the site administrator's Hosted Journals list.)

You can try temporarily dropping some plain text in there to see what I mean.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8860
Joined: Wed Aug 10, 2005 12:56 pm

Re: displaying both cover image & TOC on home page..?

Postby reflections » Fri May 31, 2013 5:25 pm

We will have a similar goal, methinks.
reflections
 
Posts: 23
Joined: Tue Jun 05, 2012 9:03 am

Re: displaying both cover image & TOC on home page..?

Postby reflections » Fri Jul 19, 2013 10:47 am

Wow, what a lot of great ideas. I'll have to discuss this with our hosting service consultant and see what is possible. Our first online issue is coming any day. - Mike Dover
reflections
 
Posts: 23
Joined: Tue Jun 05, 2012 9:03 am

Re: displaying both cover image & TOC on home page..?

Postby cristianviza » Wed Jul 24, 2013 8:03 am

Hello. I'm not sure, but I think this post comes close to what I want to pose the query so here.

I have a this code(Attached down **), and in this link a picture of whats generate http://www.subimelafoto.com.ar/visualizer.php?url=742snapshot11.png , it is a slider container journals. In cover image the journals view image journal logo(this image is the same for different journal) home but I want view in this slider, the imagen of the current edition issue for each journal ( so that every time I'm uploading a new edition I image is updated by the cover of the last) .
the link of the image I need appears in /templates/issue/view.tpl
In this code
Code: Select all
{if $coverPagePath}<div id="issueCoverImage"><a href="{$currentUrl}"><img src="{$coverPagePath|escape}{$issue->getFileName($locale)|escape}"{if $coverPageAltText != ''} alt="{$coverPageAltText|escape}"{else} alt="{translate key="issue.coverPage.altText"}"{/if}{if $width} width="{$width|escape}"{/if}{if $height} height="{$height|escape}"{/if}/></a></div>{/if}   

But I copy this code in my code **,image is not displayed :( . I think is because I don't set $coverPagePath, finally after the explanation I'm doing My question is, where set this variable? (I want to wear out view.tpl file, I'll use another file).

Thanks a lot.

**
Code: Select all
<div>
{iterate from=journals item=journal}
{assign var="displayHomePageImage" value=$journal->getLocalizedSetting('homepageImage')}
{assign var="displayHomePageLogo" value=$journal->getLocalizedPageHeaderLogo(true)}
{assign var="displayPageHeaderLogo" value=$journal->getLocalizedPageHeaderLogo()}
<div style="width:170px; height:160px;"> <img width="100" src="{$journalFilesPath}{$journal->getId()}/{$displayHomePageLogo.uploadName|escape:"url"}" {if $altText != ''}alt="{$altText|escape}"{else}alt="{translate key="common.pageHeaderLogo.altText"}"{/if} class="imgborderlist" title="Punto Info 10ª Edición"> <a href="{url journal=$journal->getPath() page="issue" op="current"}"
    class="action">{$journal->getLocalizedTitle()|escape}</a>

{if $coverPagePath}<div id="issueCoverImage"><a href="{$currentUrl}"><img src="{$coverPagePath|escape}{$issue->getFileName($locale)|escape}"{if $coverPageAltText != ''} alt="{$coverPageAltText|escape}"{else} alt="{translate key="issue.coverPage.altText"}"{/if}{if $width} width="{$width|escape}"{/if}{if $height} height="{$height|escape}"{/if}/></a></div>{/if}   
   
   
   </div>   
   
{php}
if ($i==8 )
{
echo "</div>";
echo "<div>";
$i=0;
}
//echo $i;
$i++;
{/php}
 {/iterate}
     
  </div>
cristianviza
 
Posts: 75
Joined: Tue Nov 06, 2012 10:22 am
Location: Argentina

Re: displaying both cover image & TOC on home page..?

Postby asmecher » Mon Jul 29, 2013 2:31 pm

Hi cristianvisa,

The variable is only assigned by PHP to certain templates. See e.g. pages/issue/IssueHandler.inc.php in the _setupIssueTemplate function:
Code: Select all
import('classes.file.PublicFileManager');
$publicFileManager = new PublicFileManager();
$coverPagePath = $request->getBaseUrl() . '/';
$coverPagePath .= $publicFileManager->getJournalFilesPath($journalId) . '/';
$templateMgr->assign('coverPagePath', $coverPagePath);

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8860
Joined: Wed Aug 10, 2005 12:56 pm

Previous

Return to OJS Editorial Support and Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron