Hi there,
I am using advanced_help to provide some help content to my users. I have build a small block which content depends on the page visited, and I am providing both help on specific topic (using the theme function provided theme('advanced_help_topic', $module, $topic);
But so far, I am unable to provide the most generic link: i.e. a link to the index of the module advanced help. Obviously it is feasible because such index is generated and a link is provided on the global help index page, but I do not see an easy way to do it for my own purpose.
If I specify a $topic, I get a link on that topic only. It would be great if when there is no $topic that the link returned is the link of the index of module's help.
Cheers,
Sylvain
ps: obviously I can add a direct link in my block, but it would make more sense to be able to do it using only mechanism provided by advanced_help.
Comment | File | Size | Author |
---|---|---|---|
#8 | advanced_help-theme_link_to_index-1280514-8.patch | 5.29 KB | gisle |
Comments
Comment #1
lambic CreditAttribution: lambic commentedHere's a quick stab at a patch
Comment #2
lambic CreditAttribution: lambic commentedComment #3
spouilly CreditAttribution: spouilly commentedThanks Lambic, it is a step in the right direction ... but not quite there yet. I have some comments:
1. When there is no topic, the link generated point to the general "advanced help" index (admin/advanced_help), whereas it would make more sense to have a link to the module "advanced help" index (admin/advanced_help/module_name).
Maybe the following convention would be helpful for the theme function:
2. The way you modified the theme function, actually breaks the theme function ... it no longer display the help icon next to the subject (because you return immediately with the index link, rather than setting the proper css for the link). It should go through the end of the theme function where the css/popup code is added.
Comment #4
spouilly CreditAttribution: spouilly commentedComment #5
lambic CreditAttribution: lambic commentedAnother patch. I'm hard-coding default height/width for the popup, which should probably be done through variables but it'll do for now.
Comment #6
spouilly CreditAttribution: spouilly commentedOk, I tested the last patch, and it works as expected thanks a lot ...
and yes, you are correct, being able to configure the popup through some variables would be helpful ;-)
Sylvain
Comment #7
gisleI've rerolled the patch in #5 for the latest 7.x-1-x snapshot (attached) and tried to review it.
However; I must admit don't understand what problem this patch is supposed to solve. In addition, it looks like the hard-coded default height/width for the popup may break existing pop-ups.
Please expand on the use-case for this, or create a sandbox with a small demo showing how to use the added functionality it provides.
Comment #8
gisleCreated a new patch to do this (unrelated to previous patches).
Example code that themes a link to the index is in sub-module Help example.
Please review.
Comment #10
gisleThis is now part of Advanced help 7.x-1.5.