Created
June 19, 2013 18:17
-
-
Save ryankbales/5816552 to your computer and use it in GitHub Desktop.
Pull in a custom value based on what page you are on.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% page_name = params[:page] ? "video_url_#{params[:page]}".to_sym : :video_url %> | |
<% if @client.stores.first.send(page_name).present? && @client.stores.first.send(page_name) %> | |
<li class="btn video-btn"><%= link_to "WATCH OUR VIDEO<span class='cta-bottom-icon'>#{image_tag('cta_video_arrow.png')}</span>".html_safe, @client.stores.first.send(page_name), :class => "video", :rel => "shadowbox;height=550;width=600;" %> | |
</li> | |
<% elsif @client.stores.first.video_url %> | |
<li class="btn video-btn"><%= link_to "WATCH OUR VIDEO<span class='cta-bottom-icon'>#{image_tag('cta_video_arrow.png')}</span>".html_safe, @client.stores.first.video_url, :class => "video", :rel => "shadowbox;height=550;width=600;" %> | |
</li> | |
<% end -%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment