Project

General

Profile

Actions

Bug #25181

closed

Typolink config parameter "section" overrides full "parameter" ?

Added by René about 13 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-02-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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&quot;&gt;link1&lt;/a>
<a href="#related">link2</a>

should´t it not be ?
<a href="http://domain.de/index.php?id=123#related&quot;&gt;link2&lt;/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)

Actions #1

Updated by René about 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

Actions #2

Updated by Jo Hasenau about 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.

Actions #3

Updated by René about 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.

Actions #4

Updated by Jo Hasenau about 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.

Actions #5

Updated by René about 13 years ago

yes, but config.prefixLocalAnchors seams not to work :(

Actions #6

Updated by Alexander Opitz almost 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)?

Actions #7

Updated by Nina Pinkowski over 9 years ago

Yes have the same Problem with TYPO3 CMS (6.2.3)

Actions #8

Updated by Alexander Opitz over 9 years ago

@Nina Pinkowski:

Are you using config.prefixLocalAnchors ?

Actions #9

Updated by Nina Pinkowski over 9 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';
Actions #10

Updated by Alexander Opitz over 9 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.

Actions

Also available in: Atom PDF