I am attempting to use flippy with a custom content type in Drupal 7.0. When I choose "Build a pager for this content type" the pager does not show up on the content type pages. The following is in the HTML source for the page:
<ul class="flippy">
<li class="first">
<li class="previous">
<li class="next">
<li class="last">
</ul>
If I turn on the "Add semantic previous and next links to the document HEAD" option, the correct link DOES show up in the head of the document (e.g.
), but the ul in the body is still empty.
Finally, it throws an error about half the time on page load saying "Notice: Undefined variable: first_link in include()... Notice: Undefined variable: previous_link in include()... Notice: Undefined variable: next_link in include()... Notice: Undefined variable: last_link in include()". The error is thrown whether the second flippy option is selected or not.
An example of the error can be found at: http://joyna.noahfreitas.com/artworks/lampshade
Flippy was added after the content type and instances of the type were created, but I have run into the same problem with a new test content type as well.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | flippy.patch | 560 bytes | lorinpda |
Comments
Comment #1
wilgrace commentedI'm getting the same issue - same install as above.
On enabling the semantic links at the Content Type, I'm getting the following error message:
the html list output is then empty - no text or links
Comment #2
wilgrace commentedHi Eaton, is this module likely to be supported? It's a great bit of functionality, and currently the only module that handles it in R7, so it would be good to know if it's likely to be ready for more than a production environment
thanks
Comment #3
lorinpda commentedHi,
The function definition for function template_preprocess_flippy() simply needs the parameter to be passed by reference. In other words simply change:
to
I've attached a patch for you to review.
....
This is a really nice module. Are you still looking for a co-maintainer?
Hope that helps.
Lorin
Comment #4
wilgrace commentedAh so simple - thanks very much lorindpa, it's working beautifully now
Comment #5
noah.freitas commentedThank you, that worked beautifully.
Comment #6
PMorris commentedPerfect this is exactly what I was looking for. I couldn't figure out how to get a pager on a node rather than a page!
Comment #7
dodorama commentedI applied the patch and it works. Thanks.
Comment #8
scottlozier commentedThanks. Worked great.
I found the patch notes confusing - all you have to do is add & to line 165 before $vars
Line:165
-function template_preprocess_flippy($vars) {
+function template_preprocess_flippy(&$vars) {
Comment #9
btmash commentedI can verify the patch fixes the issue.
Comment #10
MGParisi commentedtested no issues
Please post when fixed:)
Comment #11
btmash commentedFrom what I saw, this has now been fixed.