[TYPO3-english] Cooluri: paramorder

Stephan Schreiter sphn82 at googlemail.com
Wed Sep 29 04:21:39 CEST 2010


On Tue, 28 Sep 2010 17:35:38 +0200, Jan Bednarik wrote:

> Hi,
> 
> a wise man once said: "RTM" ;)
> 
> http://typo3.org/documentation/document-library/extension-manuals/
cooluri/1.0.20/view/1/5/#id2313373

Hi Jan

Thank you very much for answering to my post. I must apologize that I 
follow up lately because I was on a flight Monday/Tuesday.

I'm afraid to say that the manual (which I of course had studied in depth 
before as well) didn't help me to get around this issue.

Please let me point out the problem in more detail.

I have a page (level 1) where I put my extension on (called that page 
'my_ext' in a prior post but just let's call it 'page1' here).

The order of the get-parameters (framework dependent - I don't have much 
influence on them I think) is '?tx_myext[category]=5&tx_myext[controller]
=category'.

Now my CoolUriConf.xml looks like that:


<?xml version="1.0" encoding="utf-8"?>
<cooluri>
 
  <cache>
    <usecache>1</usecache><!-- READONLY -->
    <params2cool>
      <checkforchangeevery>1</checkforchangeevery>
    </params2cool>
    <cool2params>
      <oldlinksvalidfor>365</oldlinksvalidfor>
    </cool2params>
    
    <pagenotfound>
      <status>HTTP/1.0 404 Not Found</status>
      <behavior type="message"><![CDATA[ <h1>Page not found!</h1> ]]></
behavior>      
    </pagenotfound>
  </cache>

  <pagepath>
    <title>tx_realurl_pathsegment,alias,subtitle,title</title>
    
    <saveto>id</saveto><!-- READONLY -->
    <default>0</default><!-- READONLY -->
    
    <userfunc>tx_cooluri->getPageTitle</userfunc>
    <t3conv>1</t3conv>
  </pagepath>
 
  <uriparts>
    <part>
      <parameter>tx_ttnews[tt_news]</parameter>
      <lookindb>
        <to>SELECT title FROM tt_news WHERE uid=$1</to>
        <t3conv>1</t3conv>
      </lookindb>
    </part>
    <part>
      <parameter>tx_eeblog[showUid]</parameter>
      <lookindb>
        <to>SELECT subject FROM tx_eeblog_maintable WHERE uid=$1</to>
        <t3conv>1</t3conv>
      </lookindb>
    </part>

	<part pagepath="1">
		<parameter>tx_myext[domain1]</parameter>
		<lookindb>
			<to>SELECT some_field FROM tx_myext_domain1 WHERE 
uid=$1 AND NOT deleted</to>
			<t3conv>1</t3conv>
		</lookindb>
	</part>
    
    	<part pagepath="1">
		<parameter>tx_myext[category]</parameter>
	</part>        
  </uriparts>
  
  <predefinedparts>
    <part>
      <parameter>no_cache</parameter>
    </part>
    
    <part>
      <parameter>cHash</parameter>
    </part>

    	<part>
		<parameter>tx_myext[action]</parameter>
	</part>
    
  </predefinedparts>
  
  <valuemaps>
    <valuemap>
      <parameter>L</parameter>
      <!-- L is empty of 0, result is empty -->
      <value key="">0</value>
      <!-- L is 1, result is "en" -->
      <value key="en">1</value>
    </valuemap>

	<valuemap pagepath="1">
		<parameter>tx_myext[controller]</parameter>
		<value key="">AnotherController</value> <!-- default 
controller -->
		<value key="category">Category</value>
	</valuemap>
  </valuemaps>
  
  <paramorder>
    <param>L</param>
	<param>tx_myext[controller]</param>
	<param>tx_myext[category]</param>
  </paramorder>
  
<cooluris>1</cooluris>
  
</cooluri>

Whether I put the 'pagepath="1"' option in or not I get the result:

  http://my_domain/category/5/page1/?tx_myext[category]=5

'page1' doesn't go in front here.
Further more if I want to strip away 'page1' from the middle of the page-
path which would solve the problem in my case too, that doesn't work 
either. The cooluri-fied parameters don't seem to be counted as parts of 
page-path like another sub-page would be.

I appreciate every hint, thanks.

Best regards,
Stephan


More information about the TYPO3-english mailing list