Packages

This is a CMS written in Elixir. Aims to be the great open-source ecommerce and/or startup solution for those who are searching for a performance and stability on top of modern technologies like React and Elixir.

Current section

Files

Jump to
lyn web helpers sidebar_helper.ex
Raw

web/helpers/sidebar_helper.ex

defmodule Lyn.SidebarHelper do
use Application
def sidebar(conn) do
path = Enum.at(conn.path_info, 1)
if !path do
path = "objects"
end
path = path <> ".html"
eex_path = Path.join([Application.app_dir(:lyn), "../../../../web/templates/admin/sidebar", path <> ".eex"])
if File.exists?(eex_path) do
path
else
nil
end
end
end