Closed (works as designed)
Project:
Footnotes
Version:
7.x-2.5
Component:
Footnotes
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Sep 2011 at 21:37 UTC
Updated:
12 Sep 2011 at 20:11 UTC
Hi,
I am using your module in conjunction with smart paging, but instead of placing the footnotes only at the very end (last page) of each node, it would be nice to have the foot notes appear at the bottom of each page. Even better would be to only show those that are being referenced on this particular page (especially when we are talking 100 footnotes and counting).
Is there any "off-the-shelf" solution handy for this? I tried rearranging the filters execution order and stuff but to no avail.
Cheers,
Felix
Comments
Comment #1
hingo commentedHi
Some years ago there was this same question for Pagination module: #687014: Provide option to interact with Pagination module for footnotes at the bottom of each page
The short story is that Footnotes is a filter, while Pagination/Smart Paging are modules that affect node presentation. They just work on a later stage and there is no way that Footnotes can know that you will later split the text into pages - the whole point with how Drupal filters work is that the API passes along one piece of text.
So this would have to be fixed in the Smart Paging module. It woudn't be easy, but note that nowadays Footnotes provides some rudimentary Views API support that might help.
Comment #2
felixSchl commentedThanks for your answer hingo,
I was afraid it was like that. Fact is that the filter processes the document and creates an array of footnotes - woudn't there be a way to keep this information so that it can be used in my template file or something? It's funny how the goal is so close and yet so far.
As to the Views API: there is not a views3+D7 port, is there? I was thinking about tackling this myself but I was not sure if this would actually even give me the result I was looking for: A themeable list of footnotes without any of the content?
Cheers,
Felix
Comment #3
hingo commentedRight. The Views modules were not yet ported to Drupal7 and I don't think anyone else is working on it either.
But at the same time I don't know if they even solve the problem for you. With the Views functionality you could get the list of footnotes separately, but it still doesn't know and cannot know which footnotes should be shown on which page. Really the right solution is that the module that splits text into pages should do the splitting first and filtering afterwards.
Comment #4
felixSchl commentedOk. I dragged myself through to getting this into D7. The lack of documentation of how to use the field API with Views is really frustrating.
Anyway I got it to work eventually just to find out that you are appending a random string to your IDs to make them unique. That's of course a good idea, but would it possible to generate them in such a way that they are unique to a node? Maybe myfootnote1_nodeid or something? Because my footnotes do not match up anymore when using my embedded view for the footnotes (second filter pass added different random string).
Cheers,
Felix
Comment #5
hingo commentedBelieve me, I would've wanted to make them deterministic, but the filter API doesn't tell me things like node id. It's just a piece of text without context. (For instance, you could filter some text which isn't part of any node.)
Comment #6
felixSchl commentedAlright, gotcha. I will try to sample some random piece of text of that node and use that. That might work and should be consistent across.