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.

No comments:

Post a Comment