Where do I put the share buttons code? (share42) -
i generated buttons , downloaded folder has .png image .js file. put code , image? i'm familiar html , css.
our website built on modx platform. can edit html , css on pages.
modx revolution (the latest version of modx) tries not tell put things images , css. traditionally, javascript, css, images, , other front-end static resources go in "assets" directory.
edit: noticed script share42 , have modified answer accordingly:
let's unzipped directory , uploaded assets directory. file structure in traditional install follows:
- assets
- components (used modx extras store js, css, etc...)
- share42
- icons.png
- share42.js
- connectors
- core
- manager
then, paste following code in appropriate place in modx template or chunk:
<div class="share42init"></div> <script type="text/javascript" src="[[++site_url]]assets/share42/share42.js"></script>
this should work in properly-set-up modx installation, because [[++site_url]] should resolve url of modx installation.
tip: if relocate or rename assets directory, might want use [[++site_url]][[++assets_url]]share42/share42.js
script url isntead.
Comments
Post a Comment