Here's the context of the code from: issue.tpl
- Code: Select all
{if $hasAccess}
{foreach from=$article->getGalleys() item=galley name=galleyList}
<a href="{url page="article" op="view" path=$article->getBestArticleId($currentJournal)|to_array:$galley->getGa\
lleyId()}" class="file">{$galley->getLabel()|escape}</a>
{/foreach}
{/if}
Specifically, I'm studying .....
- Code: Select all
{url page="article" op="view" path=$article->getBestArticleId($currentJournal)|to_array:$galley->getGa\
lleyId()}
I know url is a customize function in TemplateManager, as is to_array. I know what $article and $gallery are too.
I've learned that to_array is basically a call to func_get_args (I read up on this, but I'm not sure how it functions in a smarty template file)
but I can't figure out
- Code: Select all
path=$article->getBestArticleId($currentJournal)|to_array:$galley->getGalleyId()
What do the "|" and ":" do? Is that Smarty syntax or PHP syntax? It's very hard to search for their meaning because most search engines seem to ignore "|" and ":" as search terms.
Overall, I'm working on code that wants to emulate what the above code does with a slight twist. But I can't seem to make it work in the same way.
