Skip to content

Instantly share code, notes, and snippets.

@jmertic
Created April 21, 2011 01:51
Show Gist options
  • Select an option

  • Save jmertic/933506 to your computer and use it in GitHub Desktop.

Select an option

Save jmertic/933506 to your computer and use it in GitHub Desktop.
{capture name=getLink assign=link}{{sugarvar key='value'}}{/capture}
{{if $vardef.gen}}
{sugar_replace_vars subject='{{$vardef.default|replace:'[current_user_id]':$current_user->id|replace:'{':'['|replace:'}':']'}}' assign='link'}
{{/if}}
{if !empty($link) && $link != "http://"}
{* // Start customization *}
{capture assign=link}{$link|replace:'[current_user_id]':$current_user->id}{/capture}
{* // End customization *}
{capture name=getStart assign=linkStart}{$link|substr:0:7}{/capture}
<iframe src="{if $linkStart != 'http://' && $link}http://{/if}{$link}" height="{{sugarvar key='height'}}" width="100%"/></iframe>
{/if}
{{if !empty($displayParams.enableConnectors)}}
{{sugarvar_connector view='DetailView'}}
{{/if}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment