简体   繁体   中英

How do I call a plugin in an if else in PHP using PyroCMS

example

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

my plugin function does not work inside the php if/else

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

Try that without the <?php tags

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM