2016-03-22 21 views
-1

'daki bazı içerik dosyaları için dahil etme Bu satırları yalnızca kendi CMS altbilgemdeki bazı içerik dosyaları için eklemek istiyorum. Ben basit bir çözüm buldukMathJax JS-Komut Dosyalarını yalnızca CMS

include_once($_SERVER['DOCUMENT_ROOT']."/data/after_content.php"); 

cevap

0

: Her içerik dosyasının sonunda

<script type="text/x-mathjax-config"> MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});</script> 
<script async type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> 

MathJax

kullanmak için

Hatları ben altbilgi ve diğer şeyler için bu hattı var. Benim altbilgi dosyasında

:

if (isset($mathjax)) { 
    echo "<script type=\"text/x-mathjax-config\"> MathJax.Hub.Config({TeX:{extensions: [\"mhchem.js\"]}, tex2jax: {inlineMath: [['$','$'], ['\\\(','\\\)']]}});</script>\n"; 
    echo '<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>'."\n"; 
} 
her içerik dosyasının sonunda