Bug #25181
closedTypolink config parameter "section" overrides full "parameter" ?
0%
Description
Hi there,
im not sure but is it right behaviour that the generated links from typolink will hav no more parameter if i use the section property in config?
exmpl.
If i do the folowing:
$linkconf = Array(
"parameter." => Array(
"data" => "TSFE:id"
)
);
echo $this->cObj->typoLink("link1", $linkconf);
$linkconf["section"] = "related";
echo $this->cObj->typoLink("link2", $linkconf);
i get:
<a href="http://domain.de#index.php?id=123">link1</a>
<a href="#related">link2</a>
should´t it not be ?
<a href="http://domain.de/index.php?id=123#related">link2</a>
The tsref says nothin about overwriting the whole thing
in order of my base href it will allways point to http://domain.de/#related :(
(issue imported from #M17771)
Updated by René over 13 years ago
Sorry the links get parsed here :)
i get
a href="http://domain.de/#index.php?id=123">link1</a
and
a href="#related">link2</a
Updated by Jo Hasenau over 13 years ago
as long as your links are pointing to the current page it doesn't make any sense to prepend the URL, since it will be enough to just jump to the element marked by the anchor.
Try if it gives you the same results, when linking to a section of another page.
Updated by René over 13 years ago
Hi!
sure, but if i use links to a local site in my extension (means i cant define that the links will point to a different site) and the server makes use of a base tag then all ancor links with a url of "#ancor" will be prependet with the base href and bekome http://domain.de/#ancor. that will not work in no case.
am i wrong?
I´ve tried to use config.prefixLocalAnchors = all but it does not make any sense.
Updated by Jo Hasenau over 13 years ago
Actually config.prefixLocalAnchors is the way to go in your case, since it will add the whole site script to your anchor instead of just prepending the base URL.
Updated by René over 13 years ago
yes, but config.prefixLocalAnchors seams not to work :(
Updated by Alexander Opitz about 10 years ago
- Status changed from New to Needs Feedback
- Target version deleted (
0) - Is Regression set to No
Hi,
as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (6.2.3)?
Updated by Nina Pinkowski almost 10 years ago
Yes have the same Problem with TYPO3 CMS (6.2.3)
Updated by Alexander Opitz almost 10 years ago
@Nina Pinkowski:
Are you using config.prefixLocalAnchors ?
Updated by Nina Pinkowski almost 10 years ago
Yes: prefixLocalAnchors = all
Got arround the problem by writing it this way.. because I only need it for a form that sends at the same page again:
$markerArray['###FORM_ACTION###'] = $this->cObj->typoLink ( '', array( // Link to current page 'parameter' => $this->id, 'section' => '', // Set additional parameters 'additionalParams' => '', // We must add cHash because we use parameters 'useCacheHash' => true, // We want link only 'returnLast' => 'url' )).'#configurator';
Updated by Alexander Opitz almost 10 years ago
- Status changed from Needs Feedback to Closed
So I'll close this issue, as there is no response from the author René of this issue.
If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.