How to get Search Engine Friendly URLs with ChronoForms & sh404SEF- Joomla!
A Joomla! extension we are quite fond of is ChronoEngine's Chronoforms, a very flexible form building component. We love it for many reasons, some of which include:
- It's very easy to set up
- Its ability to run integrate with bespoke code
- And finally, its real time javascript validation.
However, we are also fond of sh404SEF - another great Joomla! component that offers advanced functionality over the default Joomla Search Engine Friendly URL options. But when trying to run the two together, you will run into problems with compatibility, as sh404 will not generate SEF URLs properly for forms made in ChronoForms.
Here we will show you how to overcome this problem and get lovely search engine friendly URLs on your ChronoForms!
The Issue
Above is an example of the default ChronoForms URL generated by sh404SEF and generated in the standard menu link. As you can see, it's not very friendly at all!
Now, no matter what you do in the sh404SEF configuration - the ChronoForms configuration - you won't be able to generate a nice URL, so here is the solution...
The Fix
Normally in Joomla, you would create a menu link to your component and away you go, but here-in lies the problem. What you need to do instead is ditch that menu link completely and instead load the form from inside a good ol Joomla article with the help of the ChronoForms article plugin.
(Above is how our URL will look after following the tutorial below)
The Tutorial:
Before staring, I will assume you have already set up your ChronoForm so I won't go into how to do that. We will begin by assuming your form is ready and has a menu link to it.
Step #1: Download the Chronoforms Article Plugin
Go and download the ChronoForms article plugin from here (If using Joomla 2.5):
Then install it as normal via the Extension Manager. Once installed, enable it from the plugin manager:
Step #2: Create a New Article
Next, go to your Joomla article manager and create a new article. Copy and paste the following code into the article body:
{chronoforms}YOUR_FORM_NAME_HERE{/chronoforms}
Of course, be sure to replace the text inbetween the brackets with the name of your ChronoForm.
Here's how how it should look:
Step #3: Remove the Old Menu Link to ChronoForms
Now we have our article with the form loaded in it, we need to remove the old ChronoForms menu link. So load up the menu manager and remove the menu link to ChronoForms:
Step #4: Add a New Menu Link
Now we just have to add a link of the standard article type to the new article we created containing the ChronoForm plugin code. It should look something like so:
#Step 5: You're done!
Visit your new link from the front-end of the website and you should see your ChronoForms on the page, with a beautiful search engine friendly URL!
Conclusion
This isn't the only solution to this issue but I find it's the most effective and simple. There is a sh404SEF plugin available that fixes this issue, but it gives you far less control over your finished form page. (Lowercase page titles despite it being set to capatilise in the sh404 options being one of them).
To find out more about sh404SEF and ChronoForms, visit their websites where they both have fantastic support forums.
sh404SEF - Anything Digital
ChronoForms - by ChronoEngine
If you have any trouble when following this tutorial or need any other help with your Joomla website or extensions, then please do get in touch and we'll do our best to help.