Hello, my problem is that I have a very long page. When you click on the links at the bottom of the page you have to be able to roll up very far to see the Ajax content.
Can I get it that the Ajax link always jumps to the actual node title or image on top? Similar to anchor links?
Greetings Frank
Translated with Google
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | pic.jpg | 891.09 KB | frank hh-germany |
Comments
Comment #1
serjas commentedCurrently no, but you can achieve this by hacking from line 132 of ajax_links_api.module.
For example ajaxify https://drupal.org/node/2218779#comment, then split the fragment (#) and generate link using fragment
Comment #2
frank hh-germany commentedHi, firstonce Thank you.
Unfortunately this does not work and I have now tried a lot.
Parse error: syntax error, unexpected '<' in / homepages/42/d252324900/htdocs/tecmawi/sites/all/modules/ajax_links_api/ajax_links_api.module on line 132
-------------------------------------------------------------
Parse error: syntax error, unexpected ')' in / homepages/42/d252324900/htdocs/tecmawi/sites/all/modules/ajax_links_api/ajax_links_api.module on line 130
Here is the code I've tried preferred. Beginning line 120; End line 140
-------------------------------------------------------
Would be nice if you it has a solution.
Do I understand correctly that I then have to insert only on the target page an anchor?
The landing page is linked via an image. I use this with the Delta Image Module. > Link to Content.
Can we formulate as follows: :
'rel' => $element['target-top'], or
'rel' => $element['target-image'], or somehow similar?
Greetings Frank
Comment #3
frank hh-germany commentedOk, now I have used the following code.
There are at least no more error messages.
On the home page, I have placed an anchor.
On the previous page I have a link with #top placed.
Despite Hashlink and anchor but is not bound to the anchorage.
After the array still would have a command here, as show the page title, or go to the beginning of the main content.
Unfortunately, I am familiar with php and co not look good.
Could it work here somehow?
Greetings Frank
I just still found here. Can I automate this?
onclick="parent.window.scrollTo(0,0);"
and another fund is here. Where should the be placed?
If the first 0 of the distance from the top and the second 0 of the distance from the left?
Comment #4
frank hh-germany commentedHere is a picture of my unfinished Homepage