Tuesday, 12 January 2016 05:24

Installing Joomla on a Wamp local server

I've just created a quick video walk through of how to install Joomla on a local wamp environment. Mamp is one of those must have tools that all website developers use. It allows the developer to build and modify a database driven dynamic website on your local computer without uploading it to the internet. This allows for very quick development. Whilst for the inexperienced it might seem very complicated, rest assured that with enough practice you will become very quick at doing this.

Published in Blog
Monday, 19 October 2015 12:15

Text limit in Joomla

For com_content use the following:

<?php $truncated_text = JHtml::_('string.truncate', $this->item->introtext, 20); ?>
<?php echo $this->item->event->beforeDisplayContent; ?> <?php echo $truncated_text; ?>

For K2 use the following:

<?php echo JHtml::_('string.truncate', $this->item->introtext, 200); ?>
Published in Blog
Monday, 12 October 2015 01:19

Adding a favicon to the Joomla T3 framework

One of the annoying bugs of the T3 framework is that it over writes the favicon everytime the framework is updates. To fix this, upload the favicon outside of your template directory. In decided to upload it directly into th root template folder.

Firstly, I put the variable $path at the top of the head. This is only neccassary if you want to dynamically insert the URL - But it's handy to do so, and I suggest you do, otherwise you would have to type the full absolute path.

<?php
$app = JFactory::getApplication();
$path = JURI::base(true).'/templates/'.$app->getTemplate().'/';
?>

 

Put the following into the head block, but make sure it comes after the call to load the T3 head:

<link rel="shortcut icon" href="<?php echo $path; ?>../favicon.ico" />

 

My head block looks something like this:

<?php
// T3 BASE HEAD
$this->addHead();
?>

<link rel="shortcut icon" href="<?php echo $path; ?>../favicon.ico" />
Published in Blog
Friday, 09 October 2015 23:30

Get the active template path

Stick this in the head:

<?php
$app = JFactory::getApplication();
$path = JURI::base(true).'/templates/'.$app->getTemplate().'/';
?>

and call it using the $path variable:

<?php echo $path; ?>
Published in Blog

I knocked up this video explaining how the "read more" divider in k2 works, and how it can effect content that contains elements such as lists within the intro text.

Published in Blog
Tuesday, 23 June 2015 23:33

Module position anywhere

The following snippet will create a module position. Place this inside any file, including view files. Replace the text my-new-position with the name of your new module position.

Published in Blog
Page 3 of 3