[Typo3] How to add dynamic parameters to external URLs?

Marlies C mc at mcuniverse.com
Sat Mar 5 23:29:00 CET 2005


"Matthias Mark" <foren at matthiasmark.de> wrote in message 
news:mailman.420.1110016276.21989.typo3-english at lists.netfielders.de...
Hi everyone,

I want to combine Typo3 and osCommerce. They are installed separately.
Because I don't want to loose the shopping cart and another parameter
changing from one application to the other one I give the session Id
and a parameter from osCommerce to Typo3.

In Typo3 I get the value of the parameter in the following way:

page.config.linkVars = osCsid
[globalVar = GP:osCsid > 0 ]
config.no_cache = 1
[else]
config.no_cache = 0
[global]

While I'm using internal links in Typo3 all works fine. The parameters are
transferred from one page to the other. But when I'm using external URLs the
parameters are lost and with it the goods in the shopping cart and another 
value.

I received already the following info:

temp.link = TEXT
temp.link {
    insertData = 1
    value = myexturl?osCsid={GPvar:osCsid}
}

I know that I can integrate it in a page with :

page.x < temp.link

But how can I assign it to an element?

Furthermore I don't have only one external URL to append the parameters. In 
my menu
there are e.g. pages  with shortcuts to external URLs which should contain 
the parameters.
Thus the parameters have to be added to the external URLs automatically. 
Maybe there would also be links to external URLs within the content of the 
Typo3-pages.


How is it possible to add paramters, which can be dynamic or static, 
automically to all
existing external URls within the Typo3 Page, without adding the parameters 
for every single
URL by your one?


To illustrate it I added the following example:

[externalUrl]?parameter1 =xyz&parameter2=[dynamic value]

1. [externalUrl]
   is an external URL, which is for expamle insert in a shortcut
2. ?parameter1 =xyz&parameter2=[dynamic value]
   this are the parameters which should be automatically added to the 
external URLs,
   in which [dynamic value] isn't a predetermined value but a value 
generated
   during runtime (e.g. the osCsid given from osCommerce)


Thanks,
Matthias

Hello Matthias,

 Funny that you should pose this question right now as we has just a few 
days ago figured out how to do it. Here is the link to the code on our 
website http://www.enomaly.com/Insert_Additional_TMEN.370.0.html  and here 
is the code:

Insert Additional parameters for menu links using stdWrap
This is a sample typoscript to generate a link with an additional parameter 
for the menu-links. This example inserts a value based on the page tile, for 
example title of the target page i.e. "GovComm", but could easily be 
modified to generate other field values such as subtitle or abstract etc.

./alias.0.html?&SELECTPRO_COMM=GovComm
--------------------------------------------------------------------------------

[PIDinRootline = 34,36] #id can be any thing,
# main menu using CSS menus
  temp.leftnav = HMENU
  temp.leftnav.entryLevel = 1
  temp.leftnav.1 = TMENU
  temp.leftnav.1.NO {
          expAll = 0
          doNotLinkIt = 1
          before.data = field:uid
          before.wrap = <A href="|.0.html?
          stdWrap.field = title
          stdWrap.wrap = |*| &SELECTPRO_COMM=|">|| &SELECTPRO_COMM2=|">|| 
&SELECTPRO_COMM3=|">|*|
          after.data = field:title
          after.wrap = |</A>
          allWrap = <div class="leftnav_unsel1"> | </div>
  }
 temp.leftnav.1.ACT = 1
  temp.leftnav.1.ACT {
          doNotLinkIt = 1
          before.data = field:uid
          before.wrap = <A href="|.0.html?
          stdWrap.field = title
          stdWrap.wrap = &SELECTPRO_COMM=|">
          after.data = field:title
          after.wrap = |</A>
          allWrap = <div class="leftnav_sel1">&raquo;&nbsp; | </div>
  }

[else]
  # main menu using CSS menus
  temp.leftnav = HMENU
  temp.leftnav.entryLevel = 1
  temp.leftnav.1 = TMENU
  temp.leftnav.1.NO {
         expAll = 0
          doNotLinkIt = 1
          before.data = field:uid
          before.wrap = <A href="|.0.html?
          stdWrap.field = title
          stdWrap.wrap = |*| &SELECTPRO_COMM=|">|| &SELECTPRO_COMM2=|">|| 
&SELECTPRO_COMM3=|">|*|
          after.data = field:title
          after.wrap = |</A>
          allWrap = <div class="leftnav_unsel1"> | </div>
  }
 temp.leftnav.1.ACT = 1
  temp.leftnav.1.ACT {
          doNotLinkIt = 1
          before.data = field:uid
          before.wrap = <A href="|.0.html?
          stdWrap.field = title
          stdWrap.wrap = &SELECTPRO_COMM=|">
          after.data = field:title
          after.wrap = |</A>
          allWrap = <div class="leftnav_sel1">&raquo;&nbsp; | </div>
  }
  [end]Regards,Marlieswww.enomaly.com





More information about the TYPO3-english mailing list