This is a hack to the core and so sould be use with causion.
What does it do?
This hack inserts an invisible anchor link between a content parts 'before' spacer and the content parts main body. the anchor is simply named the content parts ID number visible here...
![Image](http://polygonsoup.net/bbimages/acontentID_eg01.gif)
Why does it do that?
so that you may jump to specific article content parts rather than just pages as at present.
How do I use it to jump to a contentpart within the current page?
You can either use phpwcms's default hyperlinking replacement tags... [INT #contentpart id]link name[/INT]
[EXT #contentpart id]link name[/EXT]
or phpwcms's content part: link list
or you can create an html anchor tag... <a href ="#contentpart id">link name</a>[/img]
To use it to jump from one article to a specific anchor within another article you use it as follows...
[INT index.php?articleID#contentpartID]Jump to contentpart x[/INT]
[EXT index.php?articleID#contentpartID]Jump to contentpart x[/EXT]
<a name="#44">Jump to content part x</a>
No, Really, how do I use it?
to jump within the same article you simply use it as follows...
[INT #44]Jump to contentpart 44[/INT]
[EXT #44]Jump to contentpart 44[/EXT]
<a name="#44">Jump to content part 44</a>
To use it to jump from one article to a specific anchor within another article you use it as follows...
[INT index.php?about#44Jump to article with the alias: 'about', content part id: 44[/INT]
[EXTindex.php?about#44Jump to article with the alias: 'about', content part id: 44[/EXT]
you get the idea
what do i do?
copy the following code in to phpwcms_root/include/inc_front/content.article.inc.php at line 337...
Code: Select all
//[pSouper] to be placed at original line 337
//insert anchor between the article 'before space' and the content part's body
$CNT_TMP .= '<a name="'.$crow["acontent_id"].'"></a>';
//[/pSouper]
Code: Select all
// every article content will be rendered into temp var
$CNT_TMP = '';
// Space before
if($crow["acontent_before"]) {
if(!empty($template_default["article"]["div_spacer"])) {
$CNT_TMP .= '<div style="margin:'.$crow["acontent_before"].'px 0 0 0; padding:0 0 0 0; clear:both;"></div>';
} else {
$CNT_TMP .= "<br>".spacer(1,$crow["acontent_before"]);
}
}
//[pSouper] to be placed at original line 337
//insert anchor between the article 'before space' and the content part's body
$CNT_TMP .= '<a name="'.$crow["acontent_id"].'"></a>';
//[/pSouper]
// include content part code section
include("include/inc_front/content/cnt".$crow["acontent_type"].".article.inc.php");
//check if top link should be shown
if($crow["acontent_top"]) {
if($template_default["article"]["top_sign_before"].$template_default["article"]["top_sign_after"]) {
$CNT_TMP .= $template_default["article"]["top_sign_before"];
$CNT_TMP .= '<a href="#top">'.$template_default["article"]["top_sign"].'</a>';
$CNT_TMP .= $template_default["article"]["top_sign_after"];
} else {
$CNT_TMP .= '<br><a href="#top">'.$template_default["article"]["top_sign"].'</a>';
}
}
// Space after
have fun, hope it's useful to someone, hope it gets into a release candidate
![Smile :)](./images/smilies/icon_smile.gif)