Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

complex smarty inclusions #1

Open
xro opened this issue Jan 19, 2013 · 1 comment
Open

complex smarty inclusions #1

xro opened this issue Jan 19, 2013 · 1 comment

Comments

@xro
Copy link

xro commented Jan 19, 2013

Hi. Thanks for this module.

Have question: how do you deal with such:

{$this->headTitle('ZF2 '. $this->translate('Skeleton Application'))->setSeparator(' - ')->setAutoEscape(false)}

or

{$this->headLink(array('rel' => 'shortcut icon', 'type' => 'image/vnd.microsoft.icon', 'href' => $this->basePath() . '/images/favicon.ico'))
->prependStylesheet($this->basePath() . '/css/bootstrap-responsive.min.css')
->prependStylesheet($this->basePath() . '/css/style.css')
->prependStylesheet($this->basePath() . '/css/bootstrap.min.css')}

they result in error and I am not sure how to avoid it. Note I'd like to do these operations on template level. Any ideas?

@jurajseffer
Copy link

The first one works OK. I had to remove translate() though as I don't load it.

The second: you can make individual calls to headLink() on separate lines, either try wrapping it with {capture} or just {$tmp=$this->headLink()...}
With regards to the array, I think you can use the following method:
{$menu = ['item1','item2','item3' => ['item3-1','item3-2','item3-3' => ['item3-3-1','item3-3-2']],'item4']}
see http://www.smarty.net/v3_overview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants