Comments (5)
I went ahead and did this an added {{> yield region='foo' text='true'}}
to deal with differentiating between setting templates and setting text. Let's discuss soon :)
from blaze-layout.
Hey @tmeasday! Sorry for the delay. I'm trying to understand the idea but not sure I'm getting it. So, in the first example, are you trying to set the content for the 'title' region by passing its value as an argument to Layout? Where does title's value from from? Is it dynamic? Why go through the trouble of creating a yield region in this case vs. just putting some dynamic content in the layout. What am I missing :)?
from blaze-layout.
Hey @cmather. I'll try to be clearer about the base use case and then perhaps my comments above will make more sense.
We're using layouts to wrap the contents of a template in standard boilerplate. As an example, the title of the page is included in the boilerplate. For some pages, the title is fixed -- for others it's dynamic. I was talking about a case where the title is dynamic, and thus a helper on the outer template (Template.somePage.title
above).
With the current API, we could just do:
<template name="somePage">
{{#Layout template='pageLayout}}
{{#contentFor region='title'}}{{title}}{{/contentFor}}
{{/Layout}}
</template>
But I'm looking for a way to set the content or template (both are important) for a region more directly when calling {{#Layout
.
from blaze-layout.
I realise you probably haven't had time to think about this, but when you can circle back round I have a quick qn in regards to this:
If I render a layout with helper argument (like {{#Layout regionX=helper}}
), how does the component receive notice when helper
changes?
It doesn't seem like this.get('regionX')
is what I'm looking for here - it doesn't seem to be reactive and change when helper
changes. But this must work somehow... or is this a limitation of blaze?
from blaze-layout.
Might be a limitation if I recall. I Need to check though.
On Apr 24, 2014, at 11:33 PM, Tom Coleman [email protected] wrote:
I realise you probably haven't had time to think about this, but when you can circle back round I have a quick qn in regards to this:
If I render a layout with helper argument (like {{#Layout regionX=helper}}), how does the component receive notice when helper changes?
It doesn't seem like this.get('regionX') is what I'm looking for here - it doesn't seem to be reactive and change when helper changes. But this must work somehow... or is this a limitation of blaze?
—
Reply to this email directly or view it on GitHub.
from blaze-layout.
Related Issues (20)
- Make {{#with}} work again with yields and contentFor HOT 10
- #each iterator HOT 6
- template was not found when its in dir "tests" HOT 2
- ReferenceError: Tinytest is not defined HOT 2
- [Request] Ability to check if a given 'contentFor' has been set HOT 1
- Problem installing Blaze Layout HOT 1
- Errors while scanning packages HOT 1
- Should iron-router be a dependency? HOT 2
- Remove Component.lookup and Component.lookupTemplate overrides HOT 4
- In-place data changes lead to non-reactivity in route data context HOT 1
- UI.Component has been replaced with Blaze.View in 0.8.3
- Nested Layouts HOT 5
- iron-router dependencies
- Error with meteor bundle HOT 8
- BlazeUIManager doesn't render with a parent context (`UI.Body` doesn't work). HOT 1
- [Blaze-rc1]: Uncaught ReferenceError: Spark is not defined
- Breaks `meteor add` for 0.7.1.2 if installed locally HOT 3
- Installation Error HOT 8
- Couldn't find a Layout component HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blaze-layout.