<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jeepstone &#187; pop-up</title>
	<atom:link href="http://www.jeepstone.co.uk/tag/pop-up/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jeepstone.co.uk</link>
	<description>The home of Pete Jones</description>
	<lastBuildDate>Mon, 02 Aug 2010 11:12:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Open content in a modal pop-up in Joomla</title>
		<link>http://www.jeepstone.co.uk/2009/03/06/open-content-in-a-modal-pop-up-in-joomla/</link>
		<comments>http://www.jeepstone.co.uk/2009/03/06/open-content-in-a-modal-pop-up-in-joomla/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 11:31:22 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[modal]]></category>
		<category><![CDATA[pop-up]]></category>

		<guid isPermaLink="false">http://www.jeepstone.co.uk/?p=60</guid>
		<description><![CDATA[Have you ever wondered how to open an image or a Joomla page in a modal popup (one of those where the page background dims and a new page loads in front)?
To open a modal popup, you need to firstly ensure that you have the right bit of javascript loaded in the page. To do [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wondered how to open an image or a Joomla page in a modal popup (one of those where the page background dims and a new page loads in front)?<span id="more-60"></span></p>
<p>To open a modal popup, you need to firstly ensure that you have the right bit of javascript loaded in the page. To do this, open your template and place the following line in the &lt;head&gt;</p>
<p><code><span style="font-family: Century Gothic; color: #000080;">JHTML::_('behavior.modal');</span></code></p>
<p>This loads the Joomla code that shows the popup.</p>
<p>Next you need to write the link to open the content. You can do this either as a Joomla content item or just an image. Let&#8217;s do the content item first.</p>
<p>Open your content article and find the link you want to open in a popup:</p>
<p><code>&lt;a href="index.php?option=com_content&amp;view=article&amp;id=31&amp;Itemid=21"&gt;Link to a normal page&lt;/a&gt;</code></p>
<p>change this to</p>
<p><code>&lt;a href="index.php?option=com_content&amp;id=31&amp;tmpl=component&amp;task=preview" class="modal"&gt;Link to a modal popup&lt;/a&gt;</code></p>
<p>Notice we have a class added to the link called &#8216;modal&#8217;. This means that Joomla will find any link with that class and open it as a modal pop-up. We can take this one step further and specify the size of the popup.</p>
<p><code>&lt;a href="index.php?option=com_content&amp;id=31&amp;tmpl=component&amp;task=preview" class="modal" rel="{handler: 'iframe', size: {x: 680, y: 370}}" &gt;Link to a modal popup with a dimension of 680px by 370px&lt;/a&gt;</code></p>
<p>If you want to modify the template for the popup, look in your templates folder for the component.php file. This is the file we are targeting by using the tmpl=component. You can then adjust this file to suit.</p>
<p>If you want to open an image simply replace the href=&#8221;" with the path to the full size image.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeepstone.co.uk/2009/03/06/open-content-in-a-modal-pop-up-in-joomla/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
	</channel>
</rss>
