frindly routing in joomla - joomla

I am doing a website in joomla 3.0, I have select a friendly URi in the backend.
I create several componente for the website too, and my route to access to this component is like this.
<?php $link =JRoute::_('index.php?option=com_projects&view=proyectos&format=raw&task=proyecto&id='. $item->id);?>
But when the browser show this router it isn´t friendly router.
Any idea?

You need to create a router.php file for your component to tell joomla how to build the sef url and then parse it when the sef url is requested.
Check out the components/weblinks/router.php file for an example.
Alternatively, if you are using a sef component like joomsef or sh404sef, you will need to create a plugin for your component. You can find documentation on how to do this on the component makers websites.

Related

Integrating Laravel app into Joomla CMS

I would like to build a custom application in Laravel framework and include it in Joomla.
What I would like to do is to replace central content of Joomla with application served from content.
Joomla url: http://www.joomlasite.com/campaign-directory -> should show content from laravel url: http://www.joomlasite.com/laravel/directory/showall
I noticed component Joomi for Joomla, but Iam not sure if this component will be able to do that.
Please advice.
Thanks!
I think you mean Jumi, and yes, I think that Jumi can do what you want, but I believe there are other easier ways to achieve what you need to do. What you can do is use the iFrame Wrapper component in Joomla to "wrap" your lavarel application and display it in Joomla. Try that before using a Jumi if possible.

how to give the url in joomla supporting form

I’m new to joomla and I’m using joomla 2.5. I need to redirect the page in joomla to another page. I saw that JROUTE is used for giving urls in joomla. but it start only from joomla folder. I need to get a file in the path
http://localhost/joomla/images/uploads/file.pdf
how can I write the above URL in joomla standard format?? can I use JURI base with jroute ??
Try this,
echo JURI::root().'images/uploads/file.pdf'
JURI::root() will return the site url.
If you required physical path try JPATH_SITE
Hope it helps..

joomla rename component url using htaccess

I'm building an eshop using Joomla 2.5 and a commercial component for a guy who wants to have multiple vendros and I'm stuck on how to change the component's url.
What I want to change is the url that is displayed when the users passes from a link with his mouse.
For instance, the component has a SEF function which rewrites urls and makes them like that:
http://www.site.com/componentname/products/productname-productid-productcategoryid-vendorid.html
http://www.site.com/componentname/catalog/categoryname-categoryid-numberofpage.html
and what I want is to make it:
http://www.site.com/shop/products/productname-productid-productcategoryid-vendorid.html
http://www.site.com/shop/catalog/categoryname-categoryid-numberofpage.html
So when a user passes over a link it will show him the new url. Is this possible with .htaccess and rewrite rules or this can only be done through the component only? I'm asking this as the component is encoded with ioncube so I can't do it myself.
Thanks in advance!
While you can use .htaccess to rewrite any URL it won't work with Joomla! as the SEF URL is created by JRoute which uses a combination of the core route function and the route.php for the component.
The URL segments are used to find the right component to handle the request, so to change the way the URL is built you would have to modify the route.php of the component (and obviously other parts as well).
For more information on how SEF support works, read this on docs.joomla.org

how to generate sef urls manually without clicking the links in joomla site

we have sh404 sef component installed in my site.when we click any of the link on my site a sef url willl automatically generate and insert in to the databese.but i want to generate all the available sef urls for my site with out clicking all the links.how can i generate is there any way to ping all normal urls generated by me.
how can i generate sef urls manually for my site content.
You can add sh404sef links using the backend config panel. You can add them under custom redirects.

Get the SEF URLs for articles in Joomla

I use 'No Editor' in Joomla with SEF URLs enabled. With no SEF enabled it's easy to know the URL by just getting the ID of the article. Something like:
Article 1 would be:
http://www.abc.com/j15/index.php?option=com_content&view=article&id=1&Itemid=1
Now if I have SEF switched on, I would get URLs that look like:
http://www.abc.com/j15/the-content.html
Is there a way inside Joomla where I can find out what the SEF URL for a particular page is?
Currently I add these articles to a menu, then from the front-end I get the SEF URL and then use it. I know the process is a little dumb, but I want to find out if there is a better way inside Joomla where you can get the SEF URL (using 'No Editor').
Upload a component, sh404sef or ARTIOsef, to the administrator panel. Here you can manage SEF URLs as well as the old URL and what new name you want to give it.

Resources