Question

i try to get a page title in a parameter for a link like:

index.php?id=1&mainsite=development

the "development" is the page title

i've try it with:

[EDIT]

50 = TEXT
    50.value = get involved
    50.typolink{
        parameter = 28
        parameter.data = #you need something else than the title here
        additionalParams.dataWrap = &mainsite={GP:type}
        additionalParams.if.isTrue.data = GP:type
        useCacheHash = 1
        ATagParams = class='btn btn-primary btn1'
    }

from Add parameter to link in typoscript

This call is in an COA and the link should become different GET params with name &type=get_involved or &type=realize. i thought, i take the title or subtitle for that.

How can i realize dynamic params in Typoscript ?

Thanks,

ShaoKhan

Était-ce utile?

La solution 2

my solution if anyone need it:

50 = TEXT
    50.value = get involved
    50.typolink{
      parameter = 28
      additionalParams.rawUrlEncode = 1
      additionalParams.data = field:header
      additionalParams.wrap = &type= |
      ATagParams = class='btn btn-primary btn1'
    }

it creates a link to page 28 and puts the GET param &type= at the end the wrap contains the header of a part of the content

The link looks like this:

http://localhost/index.php?id=28&type=dread_disease

hope it'll help. _problem solved_

Autres conseils

50 = TEXT
50.value = get involved
50.typolink{
    parameter.data = #you need something else than the title here
    additionalParams.dataWrap = &mainsite={GP:mainsite}
    additionalParams.if.isTrue.data = GP:mainsite
    useCacheHash = 1
    ATagParams = class='btn btn-primary btn1'
}

You can not link to the title directly, because TYPO3 uses the UID of a page to generate internal links. Any approach using a real page title for the link would result in an external URL, which would not give you the option of additionalParams.

So you will either need a PHP based function that generates the UID out of the title, or you must provide more than just the title within your GP vars.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top