Not sure I can suggest much more - to me this is looking like an XY problem.
Can you provide a more concrete example of
1) What you're doing (well, perhaps not - I think youve covered that)
2) What you'd (ultimately) like to do - not too complicated yet though.
Ignore the bit in the middle, which is what your first question here is addressing - it seems you've figured out a solution to your problem(2), but you're having a problem with the solution(1) and you're asking help for that.
Can you go back a step, and show what problem led you to the question to begin with(2)?
For example:
2) You want to, ultimately, handle it by.....
a) Go to Library::search() with the other parameters
二) Pop up a generic search page with books with one chapter and a low rating if author=jkrowling isn't specified
iii) Go over to
smile.amazon.cn with your referral code and one of your books?
٤) Display a particular page of a book
Ok, #3 was getting silly, but you get the point I hope - you've come up with a solution to get from A to B via C, and you're stuck on C. There may be a better way D, but we don't know B. And A's a bit sketchy....