如何使用PyroCMS在PHP中调用if else中的插件

时间:2013-04-23 20:48:32

标签: php pyrocms

例如

<?php
if ($a > $b) {
    {{ graph:top_coders_one }}
} elseif ($a == $b) {
    {{ graph:daily_commits_two }}
} else {
    {{ graph:commit_stream_two }}
}
?>

我的插件函数在php if / else

中无法正常工作

1 个答案:

答案 0 :(得分:1)

{{ if a > b }}
  {{ graph:top_coders_one }}
{{ else }}
  {{ graph:top_coders_two }}
{{ endif }}

尝试不使用<?php代码