eZ Community » Forums » Extensions » eZ Newsletter » URL trouble
expandshrink

URL trouble

URL trouble

Tuesday 24 April 2012 2:19:00 pm - 4 replies

Hello

I just get a project to maintain. This project is using eZPublish 4.1 and eZNewsletter.

The links of the newsletter are wrong, they are all relative.

How to have absolute url in the generated newsletter instead of relative ?
There must be a conf somewhere instead of override all eZPublish templates used in the newsletter.

Thx

Tuesday 24 April 2012 2:54:18 pm

There is a standard setting used for this purpose:

site.ini->SiteSettings->SiteUrl

http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Configuration-files/site.ini/SiteSettings/SiteURL

However, there is nothing magic about it's use in templates that individual people may have created in the past that would make it magically work. It is really based on how the URLs are being generated in the template.

 
IF all of the URLs are created as url_alias AND piped through ezurl with the SECOND parameter set to true, then you should get full URLs as you expect.

However, if the urls were generated without ezurl, for instance, there is no simple solution that I know of.

Wednesday 25 April 2012 11:06:09 am

Quote from David Ennis :

There is a standard setting used for this purpose:

site.ini->SiteSettings->SiteUrl

http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Configuration-files/site.ini/SiteSettings/SiteURL

However, there is nothing magic about it's use in templates that individual people may have created in the past that would make it magically work. It is really based on how the URLs are being generated in the template.

 
IF all of the URLs are created as url_alias AND piped through ezurl with the SECOND parameter set to true, then you should get full URLs as you expect.

However, if the urls were generated without ezurl, for instance, there is no simple solution that I know of.

sorry - typo - second parameter should be string 'fullt', not true

Thursday 26 April 2012 7:33:39 am

hello

 

if the enwsletter is generated with a specific layout and a view layout/set/, you can add this in your layout.ini :

<span style="color: #000066; font-weight: bold;"><span>[</span>layoutname<span>]</span></span><span style="color: #000099;">PageLayout</span><span style="color: #000066; font-weight: bold;">=</span><span style="color: #660066;">template_name.tpl</span><span style="color: #000099;">ContentType</span><span style="color: #000066; font-weight: bold;">=</span><span style="color: #660066;">text/html</span><span style="color: #666666; font-style: italic;"># Related issue, http://issues.ez.no/12677</span><span style="color: #000099;">UseAccessPass</span><span style="color: #000066; font-weight: bold;">=</span><span style="color: #660066;">false #let the link in the generated page without the /layout/set/.. in it</span><span style="color: #000099;">UseFullUrl</span><span style="color: #000066; font-weight: bold;">=</span><span style="color: #660066;">true # let the link in the generated page wuth full and absolute url without change anything
of the use of ezurl operator</span>

 

i hope this help

 

Alex

Wednesday 02 May 2012 4:14:40 pm

Thx for your help. But it was the cronjob, run on a wrong siteaccess.

I have change it with : php ./runcronjobs.php -s goodsiteaccess send_newsletter

And it was ok.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from