Sha256: 34593f5bab369c44b77445f085330ae799362ec43194a00df4f6fbe0f6d004fd

Contents?: true

Size: 513 Bytes

Versions: 26

Compression:

Stored size: 513 Bytes

Contents

module Locomotive
	module SnippetsHelper

		# Give the path to the template of the snippet for the main locale ONLY IF
		# the user does not already edit the snippet in the main locale.
		#
		# @param [ Object ] snippet The snippet
		#
		# @return [ String ] The path or nil if the main locale is enabled
		#
		def snippet_main_template_path(snippet)
			if not_the_default_current_locale?
				snippet_path(snippet, content_locale: current_site.default_locale, format: :json)
			else
				nil
			end
		end

	end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
locomotive_cms-2.5.7 app/helpers/locomotive/snippets_helper.rb
locomotive_cms-2.5.6 app/helpers/locomotive/snippets_helper.rb
locomotive_cms-2.5.6.rc2 app/helpers/locomotive/snippets_helper.rb
locomotive_cms-2.5.6.rc1 app/helpers/locomotive/snippets_helper.rb
locomotive_cms-2.5.5 app/helpers/locomotive/snippets_helper.rb
locomotive_cms-2.5.4 app/helpers/locomotive/snippets_helper.rb
locomotive_cms-2.5.3 app/helpers/locomotive/snippets_helper.rb
locomotive_cms-2.5.2 app/helpers/locomotive/snippets_helper.rb
locomotive_cms-2.5.1 app/helpers/locomotive/snippets_helper.rb
locomotive_cms-2.5.0 app/helpers/locomotive/snippets_helper.rb
locomotive_cms-2.5.0.rc3 app/helpers/locomotive/snippets_helper.rb
locomotive_cms-2.5.0.rc2 app/helpers/locomotive/snippets_helper.rb
locomotive_cms-2.5.0.rc1 app/helpers/locomotive/snippets_helper.rb
locomotive_cms-2.4.1 app/helpers/locomotive/snippets_helper.rb
locomotive_cms-2.4.0 app/helpers/locomotive/snippets_helper.rb
locomotive_cms-2.3.1 app/helpers/locomotive/snippets_helper.rb
locomotive_cms-2.3.0 app/helpers/locomotive/snippets_helper.rb
locomotive_cms-2.2.3 app/helpers/locomotive/snippets_helper.rb
locomotive_cms-2.2.2 app/helpers/locomotive/snippets_helper.rb
locomotive_cms-2.2.1 app/helpers/locomotive/snippets_helper.rb