1

i m posting a form in geddy. i need to update my meta data according to posted data by the form, for this i have to pass post to

<%= partial('layout_header', {post: post}); %>
<div class="mainContain">
    <div class="container">
        <div class="wrapper">
            <% console.log(post.title); %>
            <%- displayFlash(flash); %>
            <%- render(); %>
        </div>
    </div>
</div>

for the above implementation i need my 'post' data on application.html.ejs.

thanks

1 Answers1

1

Use Session variables to pass data to header and required page. i used this for dynamic meta tags.

=========================== EDIT ====================== in controller

self.respond({
               key: value,

               headerTags: {
                    "pageTitle": "title",
                    "h1Tag" : "h1"
               }
        });

and in application.html.ejs

<%= partial('layout_header', {session: session, headerTags : headerTags }); %>
Devesh
  • 85
  • 9