1
Я пытаюсь вытолкнуть некоторые параметры названия из раздела содержимого моего макета.slim template render title parameter
Моего содержание:
-myTitle = "title"
== render :slim, :"_layouts/default" do #<<need to push myTitle
//dynamic content
section class="body" id="diashow_content" == render :html, :"_body/index"
//<!-- Modal -->
//-js
Это мое по умолчанию расположение:
doctype html
html
head
== render :slim, :"_head/default" #<<need to push myTitle
body
//invisible content
div class="handy"
section id="curtain" class="static" == render :html, :"_partials/curtain"
section id="head" class="static" == render :html, :"_partials/head"
section id="content" class="dynamic"
== yield
section id="loading" class="static collapse" == render :html, :"_partials/loading"
section id="foot" class="static" == render :html, :"_partials/foot"
По умолчанию головы, где мое название:
meta charset="utf-8"
meta http-equiv="Content-Type" content="text/html"
meta name="keywords" content="test, test2"
meta name="description" content="Ich teste nur"
meta name="robots" content="index,follow"
meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"
meta name="theme-color" content="#0E214F"
==slim :"_head/assets"
title #<< try to get myTitle attribute here
Я надеюсь, что это была прозрачность достаточно, СРЮ для мои неприятные английские навыки. Спасибо!