使用 RefineryCMS 在菜单栏中添加图像
Adding an image in the menu bar with RefineryCMS
我是 RefineryCMS 的新手,我需要在菜单栏中放置一张图片代替网站名称,但我没有 放置路径。
这是我的文章:
<header id="header">
<nav class="navbar navbar-inverse" role="banner" >
<div class="navbar-header" style= "height: 86px">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" ><%= link_to(image_tag("../assets/images/logo3.png" , id:"logosT"), refinery.root_path, class: 'navbar-brand' ) %></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<%= Refinery::Pages::MenuPresenter.new(refinery_menu_pages, self).to_html %>
</div>
我也试过放到系统文件夹里,放这个路径
system/refinery/images/2015/01/13/3h4r68bcyr_logo3.png
但还是不行
你能告诉我如何不考虑站点名称而放置图片吗?
将图像放入 app/assets/images
并使用以下内容:
<%= link_to(image_tag("logo3.png" , id:"logosT"), refinery.root_path, class: 'navbar-brand' ) %>
我是 RefineryCMS 的新手,我需要在菜单栏中放置一张图片代替网站名称,但我没有 放置路径。
这是我的文章:
<header id="header">
<nav class="navbar navbar-inverse" role="banner" >
<div class="navbar-header" style= "height: 86px">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" ><%= link_to(image_tag("../assets/images/logo3.png" , id:"logosT"), refinery.root_path, class: 'navbar-brand' ) %></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<%= Refinery::Pages::MenuPresenter.new(refinery_menu_pages, self).to_html %>
</div>
我也试过放到系统文件夹里,放这个路径
system/refinery/images/2015/01/13/3h4r68bcyr_logo3.png
但还是不行 你能告诉我如何不考虑站点名称而放置图片吗?
将图像放入 app/assets/images
并使用以下内容:
<%= link_to(image_tag("logo3.png" , id:"logosT"), refinery.root_path, class: 'navbar-brand' ) %>