Last active
February 25, 2020 18:16
-
-
Save caovillanueva/b7d581b2e9f7b6f576e41001f2525240 to your computer and use it in GitHub Desktop.
[PS1.6 PS1.7 Format text, replace HTML tags in translate string] Replace specific elements using smarty #PS16 #PS17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For PS1.6 | |
{l s='[1]Welcome[/1] [2]%s[/2]!' sprintf=[$whatever] tags=['<strong>', '<i class="name_class">']} | |
For PS1.7 | |
{l s='Call us: [1]%phone%[/1]' sprintf=['[1]' => '<span>', '[/1]' => '</span>', '%phone%' => $contact_infos.phone] d='Shop.Theme.Global'} | |
with link: | |
nav.tpl | |
{l | |
s='Call us: [1]%phone%[/1]' | |
sprintf=[ | |
'[1]' => '<a href="tel:'|cat:$contact_infos.phone|cat:'">', | |
'[/1]' => '</a>', | |
'%phone%' => $contact_infos.phone | |
] | |
d='Shop.Theme.Global' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment