Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
Hi. I´m currently trying to create an editable region so that a client can insert the code of a twitter timeline and another to insert the code of a google map. the codes are:
Code: Select all
<a class="twitter-timeline"  href="https://twitter.com/arturojmontero"  data-widget-id="397169666931437568">Tweets by @arturojmontero</a>
    <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

for twitter and
Code: Select all
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.co.ve/maps/ms?msa=0&amp;msid=215832304540451945187.0004eab40d13e6bdb80e2&amp;ie=UTF8&amp;t=h&amp;ll=10.466836,-66.815621&amp;spn=0,0&amp;output=embed"></iframe><br /><small>Ver <a href="https://maps.google.co.ve/maps/ms?msa=0&amp;msid=215832304540451945187.0004eab40d13e6bdb80e2&amp;ie=UTF8&amp;t=h&amp;ll=10.466836,-66.815621&amp;spn=0,0&amp;source=embed" style="color:#0000FF;text-align:left">En 123 tu pagina web</a> en un mapa más grande</small>
for google maps.
I´ve tried with editable regions of text, textarea and richtext using the "source" option but pasting the codes results in the code snippets displayed in the page instead of the actual timeline or map. Any help? have anybody tried this?
hi there, this happened to me in the past too with an editable region for a YouTube embed code. You need to add no_xss_check='1' . Here is an example for YouTube
Code: Select all
<cms:editable name='embed_video' type='textarea' no_xss_check='1' />
Great Potato that work for the map and the timeline too.. Thanks
If your client isn't a tech-pro, you could consider using a simpler Google Maps code. I'm currently using this:
Code: Select all
<a href="http://maps.google.com/?q=<cms:show google_code />"><img src="https://maps.googleapis.com/maps/api/staticmap?zoom=14&size=350x175&scale=1&markers=color:red%7C<cms:show google_code />\&sensor=false"></img></a>

... which results in a static map image which links directly to the Google Maps website with the set location. The client only has to insert an address with + instead of spaces, e.g. Central+Park,+New+York. I find this easy to use for non-tech-expert clients.
Thanks krisdoff i´ll defenitely try that since most of our users aren´t tech savys, this seems much simpler for them to edit
5 posts Page 1 of 1