webarkio / wp_qoob

Qoob WordPress Plugin - Realtime Frontend Page Builder of New Generation
http://webark.com/qoob/
GNU General Public License v3.0
16 stars 7 forks source link

How can I insert a google site map code into a block? #25

Closed Alecto closed 7 years ago

Alecto commented 7 years ago

i try use text or textarea types in config.json

            {
                "name": "map_code",
                "label": "Map code",
                "type": "text"
            }

the first problem - i cannot use double quotes inside iframe code. I replaced them with single quotes, this should not cause errors:

        "defaults": { 
            "map_code": "<iframe src='https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d164153.5222970856!2d36.145742038497254!3d49.99450702572823!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x4127a09f63ab0f8b%3A0x2d4c18681aa4be0a!2z0KXQsNGA0YzQutC-0LIsINCl0LDRgNGM0LrQvtCy0YHQutCw0Y8g0L7QsdC70LDRgdGC0Yw!5e0!3m2!1sru!2sua!4v1505672455023' width='600' height='450' frameborder='0' style='border:0' allowfullscreen></iframe>"
        }

in template.hbs: <div class="home-item__map">{{map_code}}</div>

the second problem is that on the page the embed code is displayed as text, but not as google map.

https://image.prntscr.com/image/cnB6dMWOQMSsYk7ECooZ6A.png https://image.prntscr.com/image/sDysCRdGTLCuUtWqmZV4Yw.png

this task is very simple, but for some reason it can not be solved in a qoob. if there is a solution - help me plz, if not - I have to use another pagebilder.

Alecto commented 7 years ago

and the same if i try to use any html code "text": "<a href='mailto:my-email@email.com'>email@email.com</a>",

Alecto commented 7 years ago

my mistake, i have to use {{{map_code}}}