NYCPHP Meetup

NYPHP.org

[joomla] OK, I give up. Where is the "magic" for links?

Chris French contact at chrisfrench.me
Tue Jul 17 11:40:24 EDT 2012


Something seems not right about this.

Relative paths are not a joomla thing they are a web thing, putting the
domain in the href isn't only not needed it is not recommended because what
if you change your domain name?

Now this wouldn't be as much of an issue if you were using the juri to
generate but still this is 99% of the time not needed.

You should post the code you were writing and the problem and we can fix it
for you
On Jul 17, 2012 7:44 AM, "Matt Thomas" <matt at betweenbrain.com> wrote:

> Hi David,
>
> Thanks. Out of curiosity, what was the code that you were writing?
>
> Best,
>
> Matt Thomas
> Founder betweenbrain <http://betweenbrain.com/>™
> Lead Developer Construct Template Development Framework<http://construct-framework.com/>
> Phone: 203.632.9322
> Twitter: @betweenbrain
> Github: https://github.com/betweenbrain
>
>
>
> On Tue, Jul 17, 2012 at 10:12 AM, David Roth <davidalanroth at gmail.com>wrote:
>
>> Hi Matt.
>>
>> The mystery to me is that in the code I was writing I never did a call to
>> JURI, so it must be done further up the chain or the Joomla template does
>> it. Either way, it was alarming to 'echo' the variable only to see it
>> didn't contain a full URL.
>>
>> I  never paid attention to the relative paths before because they were
>> working so I didn't bother to examine them until now.
>>
>> Thanks everyone. I learned something today. If the base URL is not
>> working, then a call to JURI is needed. If it is working, it's because
>> someplace it has already been taken care of by a call to JURI.
>>
>> David Roth
>>
>>
>> On Tue, Jul 17, 2012 at 9:12 AM, Matt Thomas <matt at betweenbrain.com>wrote:
>>
>>> Hi David,
>>>
>>> Without seeing an example of the page source, I can only guess that K2
>>> uses relative paths for the links. Can you post a link to the site in
>>> question and cite an example link from that page?
>>>
>>> Best,
>>>
>>> Matt Thomas
>>> Founder betweenbrain <http://betweenbrain.com/>™
>>> Lead Developer Construct Template Development Framework<http://construct-framework.com/>
>>> Phone: 203.632.9322
>>> Twitter: @betweenbrain
>>> Github: https://github.com/betweenbrain
>>>
>>>
>>>
>>> On Tue, Jul 17, 2012 at 8:53 AM, David Roth <davidalanroth at gmail.com>wrote:
>>>
>>>> I was poking around in K2, and when I had it print out via 'echo' a
>>>> link, I noticed it didn't include the domain. It included everything after
>>>> that. While I was playing with this K2 template I thought I had left
>>>> something out. Then I did a view source on the page and all links didn't
>>>> include the domain, but they work just fine.
>>>>
>>>> How is the domain being inserted when it's displayed as a web page? I
>>>> am guessing this takes place as Javascript someplace? If so, where?
>>>>
>>>> Yes, I know we get this done for free and should be thankful, but I'd
>>>> really like to know how this work. Thanks in advance for a
>>>> kind explanation.
>>>>
>>>> David Roth
>>>>
>>>>
>>>> _______________________________________________
>>>> New York PHP SIG: Joomla! Mailing List
>>>> http://lists.nyphp.org/mailman/listinfo/joomla
>>>>
>>>> NYPHPCon 2006 Presentations Online
>>>> http://www.nyphpcon.com
>>>>
>>>> Show Your Participation in New York PHP
>>>> http://www.nyphp.org/show_participation.php
>>>>
>>>
>>>
>>> _______________________________________________
>>> New York PHP SIG: Joomla! Mailing List
>>> http://lists.nyphp.org/mailman/listinfo/joomla
>>>
>>> NYPHPCon 2006 Presentations Online
>>> http://www.nyphpcon.com
>>>
>>> Show Your Participation in New York PHP
>>> http://www.nyphp.org/show_participation.php
>>>
>>
>>
>> _______________________________________________
>> New York PHP SIG: Joomla! Mailing List
>> http://lists.nyphp.org/mailman/listinfo/joomla
>>
>> NYPHPCon 2006 Presentations Online
>> http://www.nyphpcon.com
>>
>> Show Your Participation in New York PHP
>> http://www.nyphp.org/show_participation.php
>>
>
>
> _______________________________________________
> New York PHP SIG: Joomla! Mailing List
> http://lists.nyphp.org/mailman/listinfo/joomla
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/joomla/attachments/20120717/21271cbe/attachment.html>


More information about the Joomla mailing list