Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inject meta-data from the partial #18

Open
RobLoach opened this issue Feb 12, 2014 · 2 comments
Open

Inject meta-data from the partial #18

RobLoach opened this issue Feb 12, 2014 · 2 comments

Comments

@RobLoach
Copy link

Usually when building a Partial, you have something like:

Hello <%=@name or 'World'%>
Welcome to <%= @site?.name or 'My Site' %>

Now, what if you could inject meta-data to the document from the Partial itself?


---
someData: "Oh, yes please."

---
Hello <%=@name or 'World'%>
Welcome to <%= @site?.name or 'My Site' %>

Then calling @partial('mypartial') would manipulate the source document's meta-data.

@balupton
Copy link
Member

Interesting... Is there a real-world use case / demand for this?

@RobLoach
Copy link
Author

Would've solved a problem I was running into, but then I switched to using a layout for it instead. It's still an idea, not entirely sure how feasible it is, but an idea, no less.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants