Sunday, May 30, 2010

Link in module title: Jumi + Articles Anywhere

How to set link in Joomla module title?
For example, let's show an article in module, with link to this article in module title.

1. Install Jumi, if you haven't done that already - it's incredibly useful component.

2. Install Articles Anywhere, plugin that displays article in any content.

3. Create Jumi module, publish it to position you choose, set any title, select option "Show title: Yes".

4. In "Code" field (on the right of module properties), write this code, with article_id changed to id of your article:

<?php $module->title="{article article_id}<a href=\"{url}\">{title}</a>{/article}"; ?>
{article article_id}{text}{/article}


First row will set module title to {article article_id}<a href="{url}">{title}</a>{/article}, and second will set module body.

Articles Anywhere plugin will parse tags in braces before display, changing it to corresponding html-code.

Why I Blog

For a number of times, I've encountered problems, with solutions not available anywhere on the net, and saw more inquiries about the same problem, unanswered. So I started my blog, to publish solutions I've found. This blog is also available on Russian, specially for my countrymates.

If you have something to say, please, leave a comment, I'll really appreciate it.