Partials should have a variable outputPage available, so Relative works out-of-the-box with extensions blog Posts and Indexifier #393

ge0ffrey opened this Issue Feb 26, 2014 · 1 comment


None yet
2 participants

ge0ffrey commented Feb 26, 2014

To make the file:// protocol work locally, you need to use the Relative extension. But to make Relative work with extensions that change the directory hierarchy (such as Indexifier and blog Posts), you need to pass an extra variable (which I call outputPage) through all partials:


= partial('blogPostBody.html.haml', :outputPage => page, ...)


= partial('userBadge.html.haml', :outputPage => page.outputPage, ...)


= relative("/common/twitterLogo.png", page.outputPage)

Make partials provide that outputPage out of the box.

I am not the only one running into this (they call it realPage instead outputPage):

Other names for outputPage: realPage, ancestorPage, rootPage. Name it as you like :) Don't use the name parentPage, because a partial inside a partial should reference not it's parent (= the other partial) but that one above it.


This comment has been minimized.

Show comment Hide comment

LightGuard Apr 7, 2014


Using output_page instead of the camel case. Camel case isn't typical in ruby.


LightGuard commented Apr 7, 2014

Using output_page instead of the camel case. Camel case isn't typical in ruby.

@LightGuard LightGuard closed this in ce23c87 Apr 7, 2014

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