CoolURI, urlsuffix and .xml extension

View: New views
7 Messages — Rating Filter:   Alert me  

CoolURI, urlsuffix and .xml extension

by Grégory Duchesnes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I'm using CoolURI for one of my projects and i have a problem  
generating proper urls for xml files.
I use (and i need) <urlsuffix>.html</urlsuffix>

In order to have my xml urls written, i added this set of valuemaps  
(example for my sitemap) :

                <valuemap>
                        <parameter>type</parameter>
                        <value key="sitemap.xml">200</value>
                </valuemap>


Url is found and rewriting occurs but coolURI adds ".html" at the end  
of my filename, therefore i get a url ike this : sitemap.xml.html.

Is there a way to ignore urlsuffix depending on valuemaps? Is there  
another way to build those URLs?


Thanks for your help,
Duch

_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

Re: CoolURI, urlsuffix and .xml extension

by Jigal van Hemert-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Grégory Duchesnes wrote:
> Is there another way to build those URLs?

Yes, there is :-)

If you look at the thesis behind the CoolURI extension
(http://download.bednarik.org/URITransformer.pdf) on page 38 (section
7.8.3) it describes the Userfunc element.
Now if you look at the default configuration at
http://docs.google.com/View?docid=dd33gg45_3f8j96p (see Step 8 -
CoolUriConf.xml Check) then you see that the pagepath element is defined as:

   <pagepath>
     <title>alias,subtitle,title</title>
     <saveto>id</saveto>
     <default>0</default>
     <userfunc>tx_cooluri->getPageTitle</userfunc>
   </pagepath>

Okay, so the default configuration of CoolURI uses the userfunc
getPageTitle() inside class.tx_cooluri.php to build the page path.
getPageTitle() is simply a wrapper around getPageTitleBE(), so the magic
is in that latter function.

If you make an extension of your own with a class file with a modified
copy of the getPageTitleBE() function, simply use the names of the class
and function in your configuration of CoolURI.
Debug the output in each stage of the function and you'll see how the
array with parts of the page path is built.

I once customized this function to pieces and ended up with URL's that
looked exactly as they were specified by the client.

--
Jigal van Hemert.


_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

Re: CoolURI, urlsuffix and .xml extension

by Steffen Gebert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Grégory,

Maybe you should have a look at this post:
<http://lists.netfielders.de/pipermail/typo3-english/2008-May/049677.html>


Steffen

_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

Re: CoolURI, urlsuffix and .xml extension

by Grégory Duchesnes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Steffen,

I did, but it does not work for me since i'd like to keep the  
urlsuffix in all cases but .xml extension

I'll dig into the tx_cooluri->getPageTitle function...


Duch

Le 22 juil. 08 à 00:20, Steffen Gebert a écrit :

> Hi Grégory,
>
> Maybe you should have a look at this post:
> <http://lists.netfielders.de/pipermail/typo3-english/2008-May/049677.html 
> >
>
>
> Steffen
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english@...
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>

_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

Parent Message unknown Re: CoolURI, urlsuffix and .xml extension

by Darko Jr. Gonzalez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

 >I did, but it does not work for me since i'd like to keep the
 >urlsuffix in all cases but .xml extension
 >
 >I'll dig into the tx_cooluri->getPageTitle function...

CoolURI Instructions

You can add the mapping in your CoolURI configuration XML as a value map
like this:

<valuemap>
<parameter>type</parameter>
<value key="sitemap.xml">776</value>
</valuemap>

If you now enter www.your-typo3-website.com/sitemap.xml and it still
shows up as a “Page not found” error, go to the CoolURI module in the
Backend and select “New Link”. Enter the following information there:

URI:sitemap.xmlParameters:type=776Sticky:select this checkbox

If you use CoolURI in a multidomain environment, make sure to use
www.your-typo3-website.com@... for every domain and subdomain
entry.


From:
http://typo3.org/documentation/document-library/extension-manuals/seo_basics/0.5.6/view/1/2/#id3913749


Darko
_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

Re: CoolURI, urlsuffix and .xml extension

by Jan Bednarik :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

> Url is found and rewriting occurs but coolURI adds ".html" at the end of
> my filename, therefore i get a url ike this : sitemap.xml.html.

this is known issue that needs to be solved. Sorry for inconvinience.

The .html suffix is added in the CoolUri core and it's added everytime.

I will add an attribute to the urlsuffix that will define regexp when
the suffix will/won't be added.

Regards

--
Jan Bednarik
www.bednarik.org - web about Typo3 in czech
_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

Re: CoolURI, urlsuffix and .xml extension

by Grégory Duchesnes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That would be great ;-)

Duch


Le 27 juil. 08 à 10:46, Jan Bednarik <info@...> a écrit :

> Hi,
>
>> Url is found and rewriting occurs but coolURI adds ".html" at the  
>> end of
>> my filename, therefore i get a url ike this : sitemap.xml.html.
>
> this is known issue that needs to be solved. Sorry for inconvinience.
>
> The .html suffix is added in the CoolUri core and it's added  
> everytime.
>
> I will add an attribute to the urlsuffix that will define regexp when
> the suffix will/won't be added.
>
> Regards
>
> --
> Jan Bednarik
> www.bednarik.org - web about Typo3 in czech
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english@...
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
LightInTheBox - Buy quality products at wholesale price