Entries by Stefan Helander

Vertical and horizontal center img in div

This example shows how an image (img) can be vertically and horizontally centered inside a div. At the same time it illustrates how to resize the image to fit inside the div. A live view of this code can be seen here.  <html>   <head>     <title>Vertically aligned img in div</title>     <style […]

Create custom blog category layout in Joomla 1.5

If you need to customize the blog category layout in Joomla 1.5 you do like this:  Create the following subfolders to your template directory:  mkdir -p templates/yourtemplate/html/com_content/category Copy blog.php and blog_item.php from Joomla core: cp -p components/com_content/view/category/tmpl/blog.php templates/yourtemplate/html/com_content/category cp -p components/com_content/view/category/tmpl/blog.php templates/yourtemplate/html/com_content/category Customize blog.php and blog_item.php in the components/com_content/view/category/tmpl/blog.php templates/yourtemplate/html/com_content/category folder to your needs. These modified files will […]

Make a weblink (a href) not clickable

Sometimes you have a need to prohibit a visitor from clicking on a link on your site. For example if you are including content from another soruce via Atom or RSS and they contain links. The best way is of course to remove the link tag (<a href="" >) from the content. But if this […]

Joomla 2.5 – suddenly internal links contain Smart%20Search [solution]

In a Joomla 2.5 installation, SEF URLs enabled and URL rewrite using .htaccess enabled I suddenly got internal menu links with URL:s containing Smart%20Search, like: http://www.example.com/some-menu-item/Smart%20Search/some-article The link itself does not work, ending up on an error page. I have no explanation why this occurs. The solution is to go to Menu -> Menus, then […]