Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

partials not receiving variables in staticmatic-0.10.6

#3

The following information from the guide is incorrect in the 0.10.6 build:

= partial('mypartial', :locals => { :title => 'My Title' })

This will locate the partial file as in the previous example above but now passes in a local variable called title that can be used in the partial like so:

%h1 title

This is acheiving

<h1>title</h1>

instead of the intended:

<h1>My title</h1>

Reported by Joe Egan · October 23rd, 2009 @ 10:25 AM

State: resolved
Milestone: none
Assigned to: nobody

Activity

  1. Stephen Bartholomew
    Stephen Bartholomew

    Hi Joe,

    You need to add an '=' to that element:

    %h1= title

    Can you try that and let me know if it works?

    Cheers,

    Steve

    October 23rd, 2009 @ 02:01 PM

  2. Joe Egan
    Joe Egan

    Yes!!!

    Thanks a lot - that is a massive door open - can you update the documentation?

    Thanks

    October 23rd, 2009 @ 02:10 PM

  3. Stephen Bartholomew
    Stephen Bartholomew
    • State changed from new to resolved

    November 1st, 2009 @ 07:56 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.