That's exactly what I meant, and I think it was John's point when he
answered my very first question.
So if I use link together with url (and true of course) everything
should work out fine, that's what you mean right? Even for non root
sites, right?
cheers
Lorenzo
euromark wrote:
exactly
but what is the point of creating all urls full?
usually you only do that with urls that are sent in emails or pointed
out to bookmark on the website...
all other links can stay relative to root...
i didnt understand you right away
i thought you needed to do that only for some urls, not
yes, exactly only for some urls: say that a page with urls is thought to
be php included on another external site, then the links in the included
page need to be absolute otherwise they would refer to the including
site and they would be dead links.
cheers
Lorenzo
euromark wrote:
sure
that would be a scenario where you'd use it
how do you include a foreign page via php?
usually this is not permitted from the file system / php
or do you mean like an iframe / widget?
On 25 Jan., 17:23, Lorenzo Bettini bett...@dsi.unifi.it wrote:
yes, exactly only for some urls: say
sorry if I come back on this issue, but this use of link method in the
html helper does not seem to be documented: the book reports this method
signature:
link(string $title, mixed $url = null, array $htmlAttributes = array(),
string $confirmMessage = false, boolean $escapeTitle = true)
try this:
$this-Html-link(HTTP_BASE.$this-Html-url(array
('action'='...', ...)));
(1.3 syntax)
whereas HTTP_BASE should be your http://domain.de
i have this in my bootstrap:
define('HTTP_HOST',env('HTTP_HOST'));
define('HTTP_BASE','http://'.HTTP_HOST);
On 24 Jan., 12:06, Lorenzo Bettini
I'm already using link in connection with url (specifying true), but I
thought you had said that this might not work sometime...
and I don't want to set a constant for the host base, that's why I was
using url() with true, which seems to work fine...
euromark wrote:
try this:
thats extactly what does NOT work all time^^
using them directly in each other
thats why you need the base
to make sure it works even if you have a non-root-app running
anyway
as long as it works for you, this is fine
i develope on localhost/some/folders/to/app/..
and thats where it is
oh yes
thats of course a possiblity too
using true as second param of Html-url()
this way you have already http://..; which doesnt break Html-link()
sry - you're right
just dont forget the true :) than everything's fine
On 24 Jan., 17:06, Lorenzo Bettini bett...@dsi.unifi.it wrote:
I'm
Hi
with the Html and Form helper it's already easy to create absolute links
(starting from the root of the site), but I'd need to create links that
also include the address of the site (starting with http://).
This is needed since the output of the cakephp site should also be
included in
Use the html helpers url method to create the full url for the html
helpers link method, as:
echo $html-link('TEST LINK', $html-url('/advances/forward', true));
Enjoy,
John
On Dec 29, 11:07 am, Lorenzo Bettini bett...@dsi.unifi.it wrote:
Hi
with the Html and Form helper it's already easy
Hey thanks, that's exactly what I needed!
I had searched for it in the HtmlHelper but I hadn't found it since it's
an inherited method :)
cheers
Lorenzo
John Andersen wrote:
Use the html helpers url method to create the full url for the html
helpers link method, as:
echo
actually its even way easiert!
$html-link($url, TRUE)
does the trick
the above solution from john might even be wrong in some cases
(if you're not at the top level of your domain, it adds the folders to
the webroot twice...)
On 29 Dez., 12:00, Lorenzo Bettini bett...@dsi.unifi.it wrote:
and by the way
you really should use the right IDE. a good PHP Editor will make it
easy for you to look it up.
i - for example - use the phpdesigner 7 which is able to include the
whole core libraries
if i move my mouse over the parameters of $html-link() i am able to
see its parameter names +
Sorry, I just tried to move my document root away from the application
webroot, nothing was added to the url, it looks exactly like it always
do! Can you give an example of when the url will include additional
folders?
In your example, what is the content of the $url variable?
Enjoy,
John
On
I'm using eclipse, but it doesn't seem to work on ctp files, and in most
of other cases it is not able to autocomplete when using cake...
euromark wrote:
and by the way
you really should use the right IDE. a good PHP Editor will make it
easy for you to look it up.
i - for example - use the
the url may either be an array or a link
well its fairly easy
if you have www.domain.de/myapp/... via mod_rewrite mapped to /myapp/
webroot/
if you use $html-url() or link() you get /myapp/controller/action
now - include this link in the $html-link() again, you get /myapp/
i meant array or string :)
On 29 Dez., 13:51, John Andersen j.andersen...@gmail.com wrote:
Sorry, I just tried to move my document root away from the application
webroot, nothing was added to the url, it looks exactly like it always
do! Can you give an example of when the url will include
I've been using John's solution in many places and it seems to work
correcly...
John Andersen wrote:
Sorry, I just tried to move my document root away from the application
webroot, nothing was added to the url, it looks exactly like it always
do! Can you give an example of when the url will
Ok, I will have to try it out later!
I have Apache virtual host pointing to my applications webroot, which
is why I don't see a problem, even if I change the virtual host to
point to the application directory or the root directory.
Thanks for the info, enjoy,
John
On Dec 29, 4:38 pm, euromark
as i said
it might work in most cases where you dont have the folders in
between.
but even if it works due to the virtual host pointing it is still not
correct
On 29 Dez., 15:42, John Andersen j.andersen...@gmail.com wrote:
Ok, I will have to try it out later!
I have Apache virtual host
21 matches
Mail list logo