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

I am using ejs, can i have many yields in a layout? #455

Closed
weekface opened this issue Oct 22, 2010 · 3 comments
Closed

I am using ejs, can i have many yields in a layout? #455

weekface opened this issue Oct 22, 2010 · 3 comments

Comments

@weekface
Copy link

In rails, in application.html.erb,

<%= yield :header %>
<%= yield %>
<%= yield :footer %>

In our awsome expressjs,

<%- body %>

can i have many yields in a layout?

Thanks
o(∩_∩)o...

@tj
Copy link
Member

tj commented Oct 22, 2010

we dont have yields :p I cant recall what the usage is for those. content_for or something? you could invoke arbitrary functions for that:

<%- contentFor('header') %>

etc

@weekface
Copy link
Author

But i can not find the contentFor function in ejs or expressjs, where is it?

@tj
Copy link
Member

tj commented Oct 22, 2010

no where, im just saying you could write that, it would be pretty quick to write but regional content is not something express worries about, we have views and partials

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

No branches or pull requests

2 participants