Issues

ZF-8275: baseUrl view helper example error, base html tag works just with an absolute url

Issue Type: Docs: Problem Created: 2009-11-10T06:22:16.000+0000 Last Updated: 2009-12-17T05:13:43.000+0000 Status: Resolved Fix version(s): Reporter: Juan Felipe Alvarez Saldarriaga (nebiros) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_View

Related issues: Attachments:

Description

baseUrl view helper example error, base html tag works just with an absolute url and the baseUrl helper cuts the domain part, here's the example: http://framework.zend.com/manual/en/… and the tag reference http://www.w3schools.com/TAGS/tag_base.asp

Comments

Posted by Matthew Weier O'Phinney (matthew) on 2009-11-19T15:45:42.000+0000

Can you please provide me with: * What is being produced by the baseUrl() view helper * What you actually want it to produce * Indicate how you would call it to achieve these results.

Posted by Juan Felipe Alvarez Saldarriaga (nebiros) on 2009-11-19T16:49:37.000+0000

This is my url: http://192.168.2.3/MyProject/public so when I print the baseUrl return I got this: /MyProject/public so, the base tag needs the entire url (with the domain part http://192.168.2.3/MyProject/public) maybe you can add an extra argument to get the domain part too.

Posted by Matthew Weier O'Phinney (matthew) on 2009-11-20T10:59:03.000+0000

There are some difficulties with honoring this request. * Clearly the scheme needs to be returned as well, but what if the current page is under SSL, and the page you want to link to doesn't require SSL? * Should the port be included? This looks like up to three additional arguments, all of them optional, which would make for a cumbersome API.

My thought is that it would be best to have a separate helper for generating the scheme + host + port portion of the URL, and using it in conjunction to the baseUrl() view helper:

<pre class="highlight">
echo $this->hostName() . $this->baseUrl();

If you would like to see this feature, please create a proposal for it to ensure we capture all the requirements.

Posted by Juan Felipe Alvarez Saldarriaga (nebiros) on 2009-11-20T13:50:12.000+0000

hum, you'r right too many arguments and it suck, I like the idea of a new helper maybe I'll sign the CLA ;), thanks.

Posted by Valentin Bora (valentinbora) on 2009-12-17T05:13:43.000+0000

What about the serverUrl view helper? This is exactly what it does.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts