Print

Joomla 1.7 SEF URLs & F2C

Joomla (SEF) URLs have changed in version 1.7. For menu items to be active and SEF to work it is required to have an item ID in the URL. But how do you know the item ID of a NEW article to which there is no menu link? This is the problem we had with our {$JOOMLA_ARTICLE_LINK} template parameter.

The problem in a nutshell

F2C creates the Joomla articles (and content) upon saving the submission form. If the {$JOOMLA_ARTICLE_LINK} template parameter is included in the template it is replace with the url to the article index.php?option=com_content&view=article&id=xxx. Since there isn't a known item ID it isn't added.

In Joomla 1.5 this worked fine, even in combination with Form2Content Search, where the search results link directly to the article and where the read more can be created using the above template parameter.

But in Joomla 1.7 an item ID is required in the URL otherwise all kind of creative (SEF) URLs are build, resulting in in-active menu items, and modules not showing.

F2C Core SEF plugin

The solution is a Joomla plugin which replaces a tag in the created Joomla article. Form2Content links all required information for building the URL including the Joomla mechanism for determining the best item ID.

How does it work?

Instead of using the {$JOOMLA_ARTICLE_LINK}, use {$JOOMLA_ARTICLE_LINK_SEF} in your template and install the (FREE) plugin.

So for example:

<a href="http://documentation.form2content.com/{$JOOMLA_ARTICLE_LINK_SEF}" class="readmore">Read more ... </a>

Will result (in your generated Joomla article) like this:

<a href="http://documentation.form2content.com/{plgContentF2cSef}" class="readmore">Read more ... </a>

Using absolute or relative URLs is both fine, in this case our editor adds the root.

When you parse (view) the article on your website the F2C SEF plugin will render the correct URL, which is converted to a SEF URL if SEF is enabled and everybody is happy!

<< Download F2C Core SEF plugin >>