【发布时间】:2014-11-19 11:58:13
【问题描述】:
所以必须有一个简单的方法来解决这个问题......在我的网站上,有多种模式,具体取决于页面。我创建了一个模态模板,这些都可以扩展。但是,我在页面上包含的最后一个模态最终会“接管”其余部分,因此我所有的模态最终都会与最后一个包含的部分相同。我怎样才能使每个扩展对于它扩展的文件都是唯一的?
正在发生的事情的示例:
//template.blade.php
<htmls and stuff>
@yield('section_1')
@yield('section_2')
</htmls and stuff>
//Modal 1
@extends('template')
@section('section_1')
Some words
@stop
@section('section_2')
More words
@stop
//Modal 2
@extends('template')
@section('section_1')
Rabbit
@stop
@section('section_2')
Stew
@stop
我最终没有加载两个独特的模态,而是加载了两个充满兔子炖肉的模态。
【问题讨论】: