How to embed and display Google Calendar in Zotonic the Erlang CMS -


i'd able save iframe of google calendar media item , attach resource. haven't been able working.

i saved iframe code media item, selecting embedded code , choosing 'other' created rsc , attached media item it. i'm either not referring correctly in template or item not being stored properly. can shed light on how this. apologize if simple thing, can't seem figure 1 out.

much appreciation.

jeff

solved:

i getting confused on how save media item , reference in template. i'm open suggestions or comments solution.

  1. from google calender settings, copied embed code (this private or public calendar)
  2. in zotonic created category called calendar
  3. i added new media item. selected "embed code", entered title, selected other "from site" , pasted code. assigned id 387.
  4. i changed category of media item media->document , save item.
  5. i added rsc page , selected category calendar. page's id 388 , slug "building-project"
  6. i attached media item saved earlier rsc , save item.

i have local dispatch maps /calendars/[id]/[slug]

{calendar_details, ["calendar", id, slug], resource_page, [ {template, "calendar_details.tpl"}, {cat, calendar} ]},

under advanced page changed page path match resource /calendars/388/building-project

in calendars_details.tpl referenced media item this

 {% m in  m.rsc[id].media %} {# returns list of media attached.  unfortunately i'm assuming 1 item returned [387] #}    {% media m %} {# apply media tag elements in list, ie  media 387 #}  {% endfor %} 

i know seems simple , straight forward, if else challenged am, may find useful :)

thanks great framework!

jeff


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -