Template code for section ID on issue page

Hi,
For the issue page of our theme we want to create thumbnails that are customised by the section. Does anyone know the template code to get the ID of a section. Something like $publishedSubmissions.sectionId.

Thanks in advance!
Gr Bas
Application Version - OJS 3.2.1

Hi @basD

I think what you want is probably well documented in templates/frontend/objects/issue_toc.tpl:

{foreach name=sections from=$publishedSubmissions item=section}
  // do something with $section
{/foreach}

If your theme overrides that template you’ll probably have what you need.

Best,
Jason

More specifically, if you look at pages/issue/IssueHandler.inc.php there’s a method called _setupIssueTemplate that assigns the issue’s submission’s content to the array that gets passed in to the template. The key for the array is the section id:

So you’d modify the foreach loop in the template and use the key parameter to get that. That’s in the Smarty documentation.

Jason