I've this appear quite simple problem re file pathways, yet I've been attempting to solve the issue with no success. Your help could be much appreciated. I am a new comer to Joomla here is my problem.
I must show a picture situated within the images folder of my component.
Wouldso would i have the ability to properly set the road to this picture, from the inside a look at my component.
I have attempted the next during my code:
However when the page will get loaded, the src get prefixed using the SEF formatted connect to the page presently being displayed. For instance.
while viewing a 'View' known as event, rather than it pointing to :
the particular link become pointed to SEF link
that is clearly wrong path, bringing on a 404 error when being able to access the resource.
I have also attempted using JPATH_ROOT, JPATH_COMPONENT, as well as unsuccessful as these pathways are really giving the filesystem Pathways from the file, which regarded as local resource, and should not be loaded...
I really hope someone might help me about this apparently trivial problem, yet i can not solve...
I believe that rather than using relative link, i ought to use absolute link...
i'm not sure how you can specify this 'absolute' link...
i have attempted while using following, but nonetheless, it doesn't work..
rather than localhost/joomla/components/....
If you work with JCE editor (i believe it's the very best), your default directory is /images/tales.
So...you have to produce a directory within the tales directory, so when you link it, just write "directoryname/image1.png" in source, or simply click on the image button, as well as your directory can have using the image inside ! Click on the image, and isert!
If you won't want to copy your image there, you are able to link like http://yoursite.com/components/com_componentname/images/image1.png just like a usual URL.
<img src="<?php echo JURI::root();?>components/com_mycomponent/images/images1.png">