{% if theme_option_status[store_id] %}
{% if header_tag[store_id].font_family == header_tag[store_id].font_family %}
{{ a_tag[store_id].color ? 'a { color: #' ~ a_tag[store_id].color ~ '; }' : '' }}
{{ a_tag[store_id].hover_color ? 'a:hover { color: #' ~ a_tag[store_id].hover_color ~ '; }' : '' }}
{{ total.title ~ " :" }}
{{ article.date_added_d ~ ' ' ~ article.date_added_m ~ ' ' ~ article.date_added_y }}
{% if (count % rows == 0) or (count == articles|length ) %}
{{ (i % 2 == 0) ? 'even' : 'odd' }}
{{ " | " ~ article.author }}
{{ ' | ' ~ author }}这是树枝文件代码。我们如何在tpl文件中编写这段代码?我正在将OpenCart 3.0.2.0主题转换为OpenCart 2.3.0.2。我面临的问题是如何将这些困难的行转换为tpl PHP行。我已经很好地完成了所有其他代码,但是我无法完成这些代码行。如何在tpl中准确地转换这一行?
发布于 2018-03-21 08:01:27
if ($theme_option_status['store_id']) {
if ($header_tag['store_id']['font_family'] == $header_tag['store_id']['font_family']){
echo $a_tag['store_id']['color'] ? 'a { color: #' . $a_tag['store_id']['color'] . '; }' : '';
echo $a_tag['store_id']['hover_color'] ? 'a:hover { color: #' . $a_tag['store_id']['hover_color'] . '; }' : '';
echo $total['title'] . " :" ;
echo $article['date_added_d'] . ' ' . $article['date_added_m'] . ' ' . $article['date_added_y'];
if (($count % $rows == 0) || $count == strlen($articles)) {
echo ($i % 2 == 0) ? 'even' : 'odd' ;
echo " | " . $article['author'];
echo ' | ' . $author;https://stackoverflow.com/questions/49392053
复制相似问题