by
misho86 » Wed Sep 19, 2018 3:01 am
rdamir82 wrote: @misho86
You can use repeatable regions or mosaic to show embed Instagram links:
repeatable regions
- Code: Select all
<cms:template>
<cms:repeatable name='instagram_embed_code' >
<cms:editable type='text' name='inst_emb_link' label='Insta Embed Code' />
</cms:repeatable>
</cms:template>
<cms:show_repeatable 'instagram_embed_code' >
<cms:show inst_emb_link /><script async defer src="//www.instagram.com/embed.js"></script>
</cms:show_repeatable>
mosaic
- Code: Select all
<cms:template title='Blog Page' clonable='1'>
<cms:mosaic name='content' label='Content'>
<cms:tile name='embed_instagram' label='Instagram Embed'>
<cms:editable name='instagram_embed_code' label='Insta Embed Code' type='text' />
</cms:tile>
</cms:mosaic>
</cms:template>
<cms:show_mosaic 'content'>
<cms:if k_tile_name='embed_instagram' >
<div>
<cms:show instagram_embed_code /><script async defer src="//www.instagram.com/embed.js"></script>
</div>
</cms:if>
</cms:show_mosaic>
!When you paste the embed code to an editable text region you can remove the last script part
- Code: Select all
<script async defer src="//www.instagram.com/embed.js">
from the code and put into header or footer on your page.!
I hope its help.
This is good solution but, how to embed code in content if i have some line of text:
Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum
----------------------------------------------------------------------------------------------------------------
Then I want to embed some instagram
And again some content Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum
----------------------------------------------------------------------------------------------------------------
Then I want to embed some instagram
I dont know where the embeded post will be in content, that's the problem.