Thứ Ba, 21 tháng 5, 2013

Making your site Search Engine Friendly


Why Create a Search Engine Friendly Site?

In order to add your pages to its database, a search engine (such as Google) will send out so-called crawlers, spiders or bots to harvest the text on your site. These bots cannot harvest things that are created by Javascript, or 'see' images (though they do check alt tags) and the don't play well with Flash files if at all.
While all these things may make the site look better, they do little to nothing in terms of search engine optimisation (SEO).
It is important that your website can be found by people who are looking for its content, therefore you must serve content to search engine 'bots' in a way that they can interpret, analyse and identify how relevant it is to the search query.
For this to happen, you need to bring to the attention of the 'bots' important information about the page using various techniques detailed below - almost like a 'signpost' telling the 'bot' what the page contains. It will then compare what you tell it the page is about, with what it finds by itself, and run various algorithms to check if the page is in fact relevant. It also runs other checks to make sure that you are not trying to cheat the system using 'black hat' or 'grey hat' tactics to make your page rank higher.

Update Frequency


While you can manually specify in your Sitemap how frequently search engine spiders should visit your website, they have in-built systems which automatically adjust the frequency of return visits based on how often the page in question has changed.
So, for example, if you tell search engine bots to visit your page on a daily basis, but when it visits the page nothing has changed for a week, it may adjust the frequency of revisits accordingly and not return as often as you told it to. You can request, via the various webmasters portals, for the revisit rate to be amended if required.
This would suggest, therefore, that if you have regularly changing content, your website will be 'spidered' more frequently - leading to content being indexed quickly.

Title tag


The TITLE tag is found in the HEAD portion of your pages. This TITLE tag becomes the clickable title in search engine result pages (SERPs). A title should be under 70 characters in length. It should also include your keywords for the specific page, as close to the start of the TITLE tag as possible.
Google recommends that you create unique, descriptive page titles to describe to searchers what the page is about.
If a title page is not specified, or importantly if Google determines that the title is not appropriate for the content being returned for the search term, algorithms may be used to generate alternative titles which are more relevant.
Google recommends that you follow these key principles when creating a title:
  • Specify a title for every page
  • Make your title descriptive, and concise
  • Avoid keyword stuffing (repeatedly using similar words like "Foobar, foo bar, foobars, foo bars")
  • Avoid using generic titles - each page should have an unique title, ideally dynamically updated in relation to the content being displayed
  • Brand your titles, but do it concisely and in relation to the content being served
  • Use robots.txt carefully, don't disallow search engines from visiting your website
There are various webmaster tools which can be used to identify if there are problems with your listings in a particular search engine - it is always worth paying attention and correcting any problems.

Meta Description


The META DESCRIPTION tag keeps a summary of the content on the page. The tag is used by search engines to display a description of the page when displaying it in search engine result pages (SERPs). This, however, only applies if the word searched for is included in the description. Otherwise, the search engine might display another portion of the page, which includes the keyword. When writing META DESCRIPTION tags for your pages, keep them below 155 characters. Also make sure to include the most important keywords for the page in question. Consider the description to be your sales copy to get people to click the link. Thus, the description should be written for humans, not search engines.
Even though Joomla has a global field for Meta Description (Global Configuration > Site > Global Site Meta Description), you should in most cases leave this blank. Google (and possibly other search engines as well) does not like duplicate title or meta description tags. If you add something to the global field, it will be duplicated on all pages that do not have a specific meta description.
Google recommends the following to ensure that you gain the most from your search engine indexing:
  • Ensure every page has unique, relevant meta descriptions
  • Ensure you apply metadata for listing pages (e.g. blog & list layouts) in addition to individual articles - this is commonly overlooked on Joomla! websites
  • Include factual information if relevant (e.g. blog articles may include the author, products might include the price or manufacturer)
  • Consider using automatically generated metadata - but make sure it's relevant, readable and accurate
  • Make your descriptions descriptive!

Keywords


There are two major parts to understanding keywords: one is the meta tag and the other is density. If you are starting a brand new site you will need to do a little planning for both SEO and simple Joomla structure. Keywords are the focus of your content. You should come up with a list of no more than 25 keywords that describe your site's message. Once you have your list of keywords, keep them in focus as you write content and create Joomla sections, categories, and articles. Use these keywords through your site to improve SEO.
The meta keyword tag found in the head of most Web documents has little effect for Google, Bing and many of the other larger search engines. Yahoo still uses the meta tag as part of the algorithm, as well as some of the meta crawlers. Search engines all read the text in the tag; they just do not apply the information to their ranking algorithms. If your page has a keyword tag, you must make sure that word is on the same page in the content.
Density is the number of times a word is placed in the readable content of a page. If you have ten readable words and one word is a keyword the density of 10%. If you have 100 words and one of them is a keyword you now have a density of 1%. Keep your density between 3.5 and 7 percent. Look for an online density analyzer to get an estimated density of a keyword.
Make sure to use keywords in your titles or aliases, links, and content. DO NOT STUFF keywords. Content that does not make sense and is full of keywords for the sole purpose of raising the keyword density to a high level will cause your site to be penalized in the search engines. It is very difficult to write an article that someone will enjoy reading or find usable and increase the density over 7 percent.
This section has a keyword density on the term “keyword” of 1.79% and on the term “keywords” of 2.05%. The combined density is approximately 3.8%. You can see how deliberate you would have to be to stuff a site greater than 7%.
To Add Meta Keywords to Your Site:
  • Add the 25 keywords to your Global Configuration > Site > Global Site Meta Keywords.
  • Add specific meta keywords to articles using the metadata information. Make sure the keywords listed here are in the content of the article also.
  • Adding the data does not harm your rankings in search engines, and will help you in Yahoo, and meta crawlers. Never add more than 25 words in the meta data. Separate words and phrases with a comma. Do not repeat keywords.

Use Semantic HTML

What is Semantic HTML?
Semantic HTML is a way of using HTML coding to create or enhance the structure of a page. In other words, it's a way of using HTML - classes, divs, tags and so forth - to compliment the actual words or resources on a page. Again, this helps 'bots' to understand the importance, relevance, and links between the content on your page.
It's important, therefore, that you have an understanding of semantic HTML and how to use it. For example, we often see people using a H2 tag in the middle of content because it has the style that they want to use - but it's not actually a heading. How the content looks has nothing to do with the structure of the page - it's important to remember that the two are quite different.
For example, lets say we have an article:
<h1>Using headings</h1>
This is an article about the importance of headings
 
<h2>Why use headings?</h2>
It is important to use headings so that search engine bots can tell what is an <strong>important</strong> part of your article
 
<h3>Types of headings</h3>
You can use set types of headings, but they should be ordered, and structured, within your page. H1 should be your page title, with H2 being used for sub-headings of the page. Any headings within your sub-headings should cascade using H3, H4, and H5 as appropriate.
 
<h2>Is it hard to implement headings?</h2>
It is really easy to implement headings, you just use the appropriate HTML code
 
<h3>Using headings on dynamic pages</h3>
On dynamic pages, simply wrap your main heading within a H1 (for example, the title of a category listing page would be H1) then wrap all subsequent headings in H2.
Here, a search engine bot could clearly see the structure - h1, h2, h3 - but if we were to simply make these titles bold, underlined and larger font, it would be much more difficult to identify the structure. It is also possible to identify that the word 'important' is an emphasised word, something that is important within the page.
Semantic HTML is also
  • Easier to read (in the code)
  • Easier for accessibility purposes - screen readers function in a similar way to search engine bots to identify important headings
  • Potentially better for search engine optimisation

Use Links in Your Content


It is important that you ensure any links within your content inform the user what they are linking to, but without being 'spammy' - i.e. stuffed full of keywords.
Ideally you should include words which feature in the URL to which you are linking, and the hyperlinked text should be descriptive of the content you're about to view. An example where this is often done poorly on Joomla! websites is where 'Read more' links display Read More rather than the title of the article, in the hyperlinked text. Another common habit is for sites to only include a link on the word here.
This also gives the person visiting your site confidence in the link they are clicking - they know what to expect when visiting the link, so it may be more likely that they do so.
This is true for both internal links (if you're linking to another page or area on your website) and also on external links to other sites.
Be aware, however, that with recent updates to Google's algorithms (named Panda, and more recently Penguin), sites with unnatural linking profiles may be down-ranked in search engine positions. One of the main factors in the Penguin update targeted websites which had a large amount of its traffic coming from keyword-stuffed anchor text on hyperlinks from low-value websites. Keep your links relevant, appropriate and relating to what you are linking to.
Where possible, it's also wise to regularly check that your links are still valid. The user experience is tainted somewhat if 50% of the links on your site result in a 404 - Page Not Found error. There are components and plugins available which will automate these checks for you.
In short, use links appropriately, but don't make the mistake of not using them where relevant. The user experience is improved greatly when you link to any article you may be referencing (whether internal or external), and the Search Engines generally recognise this.

Have a Structured or Planned Navigation


Having a good navigation system is hugely beneficial for allowing bots to effectively crawl your site. Joomla goes a long way in doing this for you when used correctly. Using keywords in the actual link title (anchor text) will help improve rankings.
Your site structure starts with your content management - this should be structured according to your website function. A news website might categorise based on the topic (e.g. technology, business, world, etc) but a sports news website might categorise based on sport (e.g. Football, Rugby, Hockey, Cycling).
This is a critical factor in creating your website, and if used properly can have huge implications with regards to your search engine optimisation - as you can use your category name in your Search Engine Friendly URL's.
Once you have defined your content structure, the next step is to create a sitemap - even if it's on the back of a napkin - to identify what your 'top level' menu items will be, and any sub-items under them. This helps you to form an idea of how the visitor will browse your website.

If you are using sub-menus as drop-downs, it is sensible to use text separators at your top level, and the top level for any child menu items - this ensures that users who have touch-screen devices, or those using speech control, can easily click or hover over the top item, and have the sub-menu items display without being directed to a new page before having a chance to select a sub-menu item.
Website navigation is all about improving how users find content in your website. The easier users can find information on your site, the easier search engines will too.

Have an HTML Sitemap


An HTML sitemap is essentially a table of contents for your site. This serves two purposes:
  1. It provides a place where visitors can go to easily get to any content on your site, even if it isn't necessarily easy to access by other navigation aids on the site.
  2. It provides a centralized store of links to the content on your site that can be easily indexed by search engines.
  3. It allows users with disabilities to be able to quickly navigate your website with a simple list of links, rather than through complex menus
At the very least, a sitemap should link to the main sections and pages within your site, but the more detailed you can make it, the better.
There are available extensions that create sitemaps automatically based on Joomla content.

Have an XML Sitemap

Sitemaps are an easy way for webmasters to inform search engines about pages on their sites that are available for crawling. In its simplest form, a Sitemap is an XML file that lists URLs for a site along with additional metadata about each URL (when it was last updated, how often it usually changes, and how important it is, relative to other URLs in the site) so that search engines can more intelligently crawl the site.
Web crawlers usually discover pages from links within the site and from other sites. Sitemaps supplement this data to allow crawlers that support Sitemaps to pick up all URLs in the Sitemap and learn about those URLs using the associated metadata. Using the Sitemap protocol does not guarantee that web pages are included in search engines, but provides hints for web crawlers to do a better job of crawling your site.
  1. An XML sitemap provides a list of links to the content on your site that can be easily indexed by search engines.
  2. It is possible to create specific sitemaps for News, Images, Multimedia.
There are available extensions that create XML sitemaps automatically based on Joomla content. More about the Sitemap protocol

Things to Remember


There are perhaps a few basic points that readers should away;
  • Anything that requires a login will not be 'seen' by a search engine (though some search engines will allow you to tell them how to bypass these).
  • This article only just starts to scrape the surface.
  • Frequent maintenance and updates are a big part of Search Engine Optimization (SEO).
  • SEO is only the start - it might help people find your site through search engines but you've got to work out how to get them to stay or come back or use your site.
Search Engine Optimization is an ongoing task, the 'rules' used change frequently and simply undertaking SEO work once wont guarantee you a high ranking. Unique content is important, but so is site navigation. If a search engine finds it difficult to navigate your site (e.g. needs 7 'clicks' to reach an article) it will assume that real users will encounter similar difficulties. Sitemaps can help with this issue tremendously.
Although Search Engine Optimization is important, focusing on the basic elements of the user experience (easy navigation paths, unique and compelling content etc.) is often one of the best ways to ensure a higher ranking. Simple steps like ensuring appropriate Meta Keywords and Internal links will help to improve that experience further.

Thứ Hai, 13 tháng 5, 2013

JOOMLA TEMPLATES: Joomla: How to change template on a specific artic...

JOOMLA TEMPLATES: Joomla: How to change template on a specific artic...: Is there a way to change the template on a specific article only? Note that it should work without linking the article to any menu. Answ...

Joomla: How to change template on a specific article

Is there a way to change the template on a specific article only? Note that it should work without linking the article to any menu.


Answers


If you want the template override not to depend on the menu position than the standard joomla way of assigning a different template to a menu will not work. You will need to get your hands dirty and write some custom code. You will need to use the article_id as a trigger for template switch.
I did something like that at work but don't remember now how exactly this is achieved. I will post my code here as soon as I locate it.
EDIT: Found the code :)
You need to edit the file /includes/application.php, specifically the getTemplate() method. At the end of this method, just before:
// Fallback template
if (!file_exists(JPATH_THEMES.DS.$template.DS.'index.php')) {
$template = 'rhuk_milkyway';
}
you can add your condition for applying a custom template, like so:
//CUSTOM TEMPLATE FOR THE ARTICLE 13
if (JRequest::getVar('id')=='13' && JRequest::getVar('option')=='com_content') {
$template = $custom_template_name;
}
This will apply the custom template which name is inside the $custom_template_name to article with id=13. You can also use it to apply a different template to components, like I did with simplecaddy:
//TEMPLATE FOR SIMPLECADDY
if (JRequest::getVar('option')=='com_caddy'){
$template = 'shop';
}

Joomla 2.5 Templates - $showRightColumn


As we continue to review the code in the Beez2 template, we come across the following code:
// check modules
$showRightColumn        = ($this->countModules('position-3') or $this->countModules('position-6') or $this->countModules('position-8'));
  1. Based upon the name of the variable, showRightColumn, it appears the template is trying to figure out whether or not to show the right column of the template.
  2. Based upon the function called, countModules, it would appear that showRightColumn is going to be the value of how many modules are shown in each of the listed positions.
Before testing further, we will assume that if neither position-3, position-6, or position-8 have any modules being loaded, then showRightColumn will have a value of 0. Because it has a value of 0, the template would not show the right column.

What is the value of $showRightColumn?

At this point in our testing, we have:
  • 2 modules loaded in position-3
  • 1 module being loaded in position-6
When we make an adjustment to the template file to show the value of $showRightColumn, we see the value is 1. This means that showRightColumn is not the count of modules being shown, but whether any modules are shown in the list of positions. If there are no modules being loaded, then the value will be 0. Otherwise, the value will be 1 if there are any modules being loaded.
Our Testing CodeThe results
// check modules
$showRightColumn        = ($this->countModules('position-3') or $this->countModules('position-6') or $this->countModules('position-8'));
echo "showRightColumn = $showRightColumn"; die();
showrightcolumn-equals-1

Creating a basic Joomla! template


Introduction

The purpose of this tutorial is to serve as an introduction to creating Joomla templates. It will cover the essential files and code needed to create a basic template. The code is presented so it can be cut and pasted with very little modification needed.

Setting up a directory structure

To make the most basic template, create a new folder in the templates folder. Name this folder after your template i.e. mynewtemplate.
Using your favourite text editor create the files index.php and templateDetails.xml. To keep things organized, make 2 new folders called images and css. Inside the css folder create a file called template.css.
Although it is fine to place all your CSS code directly in your index.php file to start, many web developers prefer to place their CSS code in a separate file that can be linked from multiple pages using the link tag. This may also shorten the loading time of your pages, since the separate file can be cached.
This is the most basic practical setup. Outline of folder and file structure:
  • mynewtemplate/
    • css/
      • template.css
  • images/
  • index.php
  • templateDetails.xml

Creating a basic templateDetails.xml file

The templateDetails.xml file is essential. Without it, your template won't be seen by Joomla!. The file holds key metadata about the template.
The syntax of the file is different for each Joomla version.
For Joomla 1.5, use the following:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 1.5//DTD template 1.0//EN" "http://www.joomla.org/xml/dtd/1.5/template-install.dtd">
<install version="1.5" type="template">
<name>mynewtemplate</name>
<creationDate>2008-05-01</creationDate>
<author>John Doe</author>
<authorEmail>john@example.com</authorEmail>
<authorUrl>http://www.example.com</authorUrl>
<copyright>John Doe 2008</copyright>
<license>GNU/GPL</license>
<version>1.0.2</version>
<description>My New Template</description>
<files>
<filename>index.php</filename>
<filename>templateDetails.xml</filename>
<folder>images</folder>
<folder>css</folder>
</files>
<positions>
<position>breadcrumb</position>
<position>left</position>
<position>right</position>
<position>top</position>
<position>user1</position>
<position>user2</position>
<position>user3</position>
<position>user4</position>
<position>footer</position>
</positions>
</install>
For Joomla 2.5 and later, use the following version. Change version="2.5" into the version of your Joomla! installation.
<?xml version="1.0" encoding="utf-8"?>
<extension version="1.6" type="template">
<name>mynewtemplate</name>
<creationDate>2008-05-01</creationDate>
<author>John Doe</author>
<authorEmail>john@example.com</authorEmail>
<authorUrl>http://www.example.com</authorUrl>
<copyright>John Doe 2008</copyright>
<license>GNU/GPL</license>
<version>1.0.2</version>
<description>My New Template</description>
<files>
<filename>index.php</filename>
<filename>templateDetails.xml</filename>
<folder>images</folder>
<folder>css</folder>
</files>
<positions>
<position>breadcrumb</position>
<position>left</position>
<position>right</position>
<position>top</position>
<position>user1</position>
<position>user2</position>
<position>user3</position>
<position>user4</position>
<position>footer</position>
</positions>
</extension>
So, as you can see, we have a set of information between markup tags (the <element>s). Your best approach is to cut and paste this into your templateDetails.xml file and change the relevant bits (such as <name> and <author>).
The <files> part should contain all the files that you use - you possibly don't know what they are called yet - don't worry, update it later. The <folder> element can be used to define an entire folder at once.
Leave the positions as they are - these are a common set so you will be able to switch easily from the standard templates.

Creating a basic index.php file

The index.php file becomes the core of every page that Joomla! delivers. Essentially, you make a page (like any HTML page) but place PHP code where the content of your site should go. The template works by adding Joomla code into module positions and the component section in your template. Anything added to the template will appear on all pages unless it is added to one of these sections via the Joomla CMS (or customised code).
This page will show the bare-bones code ready for you to cut and paste into your own design.

Begin

A Joomla 1.5+ template begins with the following lines:
<?php defined( '_JEXEC' ) or die( 'Restricted access' );?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
The first line stops naughty people looking at your coding and getting up to bad things.
The second line is the Document Type Declaration (DOCTYPE), which tells the browser (and web crawlers) which flavor of HTML the page is using. The doctype used above is XHTML 1.0, which is supported rather well by most modern browsers. You can also decide to use HTML5, a newer version of HTML that is largely backwards compatible, but contains many new features. To use HTML5, change the doctype to
<!DOCTYPE html>
You should be aware that this will not work well in Internet Explorer 8 or earlier without a hack. You might want to investigate this situation and your clients' wishes before deciding on which doctype you want to use.
The third line begins our HTML document and describes what language the website is in. A html document is divided into two parts, head and body. The head will contain the information about the document and the body will contain the website code which controls the layout.

Head

<head>
<jdoc:include type="head" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/template.css" type="text/css" />
</head>
The first line gets Joomla to put the correct header information in. This includes the page title, meta information as well as system JavaScript. The rest creates links to two system style sheets and to your own style sheet (if it's named template.css and is located in the css folder of your template directory. So if your temlate is in http://www.mysite.com/templates/my_template/ then the css files will go in http://www.mysite.com/templates/my_template/css/).

Body Section

<body>
<jdoc:include type="modules" name="top" />
<jdoc:include type="component" />
<jdoc:include type="modules" name="bottom" />
</body>
Amazingly, this will suffice! Yes, it's a very basic layout, but it will do the job. Everything else will be done by Joomla!. These lines, usually called jdoc statements, tell Joomla to include output from certain parts of the Joomla system. Note: you will need to ensure your menu is set to go into the "top" module position.

Module Positions

Above, the line which says name="top" adds a module position called top and allows Joomla to place modules into this section of the template. The type="component" line contains all articles and main content (actually, the component) and is very important. It goes in the centre of the template.
Note: You can add your own module lines anywhere you want in the body, but you have to add a corresponding line to the templateDetails.xml file which sits alongside the index.php of your template.

End

Finish it off - one last bit:
</html>

Custom Images

If you want to add any images to the template you can do so like this:
<img src="<?php echo $this->baseurl; ?>/images/stories/myimage.png" alt="Custom image" class="customImage" />
Here the baseurl variable will fill in the path to your template for you.

Custom CSS

You can add custom css like this:
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/css/styles.css" type="text/css" />
Every file which is added must have a line in the templateDetails.xml file for the template.
This leaves a final file of:
<?php defined( '_JEXEC' ) or die( 'Restricted access' );?>
<!DOCTYPE html>
<html xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<jdoc:include type="head" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/mynewtemplate/css/template.css" type="text/css" />
</head>
<body>
<jdoc:include type="modules" name="top" />
<jdoc:include type="component" />
<jdoc:include type="modules" name="bottom" />
</body>
</html>

Testing the template

Find the template in the Template Manager, select it and click Default to make it the default template.
Joomla 1.5 In Joomla! 1.5, your new template will show up immediately in the Template Manager, accessible via Extensions -> Template Manager.
Joomla 2.5+ In the Joomla! 2.5 series and later, you first need to tell Joomla! that you have created a new template. This feature is called Discover Extensions and can be accessed via Extensions -> Extension Manager -> Discover (i.e. the Discover tab). Click Discover (i.e. the Discover button) to discover your template, then select it and click Install to install it. Now your template should show up in the Template Manager (Styles), accessible via Extensions -> Template Manager.
Note you can create your template outside of Joomla and simply install it like any regular extension.
HINT: there are a couple of ways you can preview your index page as you put it together, either insert the styles into the head of the index page or directly link it to the style sheet you will be using temporarily. You can remove these links before packaging the file.

Packaging the template for installation

A directory with several loose files is not a convenient package for distribution. So the final step is to make a package. This is a compressed archive containing the directory structure and all the files. The package can be in ZIP format (with a .zip extension), in TAR-gzip format (with a .tar.gz extension), or in TAR-bz2 format (with a .tar.bz2 extension).
If your template is in a directory mytemplate/ then to make the package you can connect to that directory and use commands like:
  • tar cvvzf ../mytemplate.tar.gz *
  • zip -a -r ..\mytemplate.zip *.*

Note to Mac OS X users

Note to template developers using Mac OS X systems: the Finder's "compress" menu item produces a usable ZIP format package, but with one catch. It stores the files in AppleDouble format, adding extra files with names beginning with "._". Thus it adds a file named "._templateDetails.xml, which Joomla 1.5.x can sometimes misinterpret. The symptom is an error message, "XML Parsing Error at 1:1. Error 4: Empty document". The workaround is to compress from the command line, and set a shell environment variable "COPYFILE_DISABLE" to "true" before using "compress" or "tar". See the AppleDouble article for more information.
To set an environment variable on a Mac, open a terminal window and type:
export COPYFILE_DISABLE=true
Then in the same terminal window, change directories into where your template files reside and issue the zip command. For instance, if your template files have been built in a folder in your personal directory called myTemplate, then you would do the following:
cd myTemplate
zip -r myTemplate.zip *

Conclusion

You should now have created a template that works. It won't look like much yet. The best thing to do now is start experimenting with the layout.

How to put modules in Joomla articles

Want to learn more about how to build professional websites with Joomla? Then check out Joomlashack University, the #1 Joomla online training program in the world.

One of the handiest tools you can have in your Joomla toolbox is the ability to put the contents of a module right into the body of an article. (The article you're reading now is using this method. See the message in the box right above this sentence? That's actually content from a module being loaded right into this article.)
This can be a significant timesaver, since you can create a module one time in the Module Manager and then simply place it into any number of articles on your site.
That means you wouldn't have to set up that content individually in every article: you do the work once and then simply tell Joomla where you want that module to appear.
To show you how to do this, I'll show you an example of using this method to put a newsletter sign up form right in an article.
Here's a look at the end result:

qt_scrnshot_1

Here's how to do this:

1) In Joomla go to Extensions>Module Manager. Then click on New to create a new module.
2) Select Custom HTML from the list of available modules. (You can put other types of modules in articles, but for this example I'll show you how to do this with a custom HTML module.)
3) Name your module. In this example, I named the module "Newsletter sign up."
4) Set show title to "No."
5) For the module Position (and here's the key of this trick), put your cursor in the field next to "Position" and type in a new position name. In this example, I've called the new position "newsletter."
qt_scrnshot_2
6) For the menu assignment, you can leave it set to All.
7) In the Custom Output area, enter in whatever content you want to have in this module. In this example, I've got some code entered that's creating the iContact newsletter sign up form:
qt_scrnshot_3

8) When you're done, save the module.
9) Go into the Article Manager (Components>Article Manager) and open up an article where you'd like to put this module.
10) Wherever you want the module to be, type in this syntax (which is sometimes referred to as the "loadposition syntax") :
qt_scrnshot_5
Replace "newmoduleposition" with the name of the new module position you created when you typed in the new position name in the custom HTML module.
For my example, this is how my article with the newsletter module in it looks when opened up in Joomla:

qt_scrnshot_4

11) Save the article and check how it looks on the front of your site. That's it!
Now, whatever article on your site that you want to have this module appear in, all you have to do is enter in the loadposition syntax and it will appear.