Skip to main content.

Popup Pages in Three Easy Steps

06/8-09 at 11.36 by: Robert Campbell

Creating external links in your CMSMS menu is a simple process, you simply create a new content item of type 'Exernal Link'... fill in the place it's supposed to be in the menu, a menu text entry, and a URL, and hit submit.   Once you refresh your properly setup web page, you see the new external page link there, it works great.

But what if you want it to appear in a new window, javascript style without the borders, and menus, etc.  That can be confusing.  This article will how to do it in three easy steps using the JQueryTools module.

Note: This module does not provide step by step instructions for all of the details of how to achieve this functionality.  You should already have experience with modifying page templates to adjust calls to the menu manager, and you should have some experience with creating or modifying menu manager templates.

Step 1: Install and setup the JQueryTools module.

Install the JQueryTools module via your preferred method (either via the module manager, or by uploading the contents of the .tar.gz file into your install's modules folder.

Then, add the following tools to your "Global Metada" under "Site Admin >> Global Settings" in the admin console:

{JQueryTools action='incjs'}
{JQueryTools action='ready'}
{literal}
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('a.fancybox').fancybox();
});
</script>
[/literal} {* syntax error intentional *}

This includes the necessary jquery and fancybox javascripts, and then links the fancybox popup functionality with all links that have the class 'fancybox'.

Step 2: Create your external popup content item

This is as simple as clicking on the "Add New Content" link in the page manager under "Content >> Pages".  Enter the following data into the fields for this test:

Content Type:  "External Link"

Menu Text:  "Calguys website"

URL:  http://www.calguy1000.com?iframe

Note the ?iframe parameter.  The fancybox code will look for this parameter on the URL to indicate that it should create an iframe in its popup window to display the contents of the URL.  There aree other ways to do this, you can find information on that in the fancybox documentation.

Step 3: Modify your menu manager template

For those of you that are somewhat experienced in modifying menu manager temploates, this should be a minor exercise.  I simply copied the simple_navigation.tpl to a new name called "my_custom_nav", modified my page templates to use template="my_custom_nav" instead of "simple_navigation.tpl", and then modified the "my_custom_nav" template as follows:

After:

{elseif $node->type == 'separator'}
<li class="separator" style="list-style-type: none;"> <hr />
Add:
{elseif $node->type == 'link'}
<li><a class="fancybox" href="{$node->url}"><span>{$node->menutext}</span></a>

Now save the menu manager template, and browse to your website.  You should see the new "Calguys website" entry in your navigation.  Clicking on it should display the homepage of this website in a nice popup window.

You're encouraged to read the documentation for JQuery and Fancybox to adjust the behaviour of this popup window to your liking.

 

17/5-10 at 04.40 by: http://www.cheap-mbt-shoes.net/
How Does Wearing Masai Barefoot Technology Shoes Help Improve Posture? http://www.cheap-mbt-shoes.net/ How to Spot Fake Ed Hardy http://www.ed-hardy.cc What Are MBT Shoes? http://www.cheap-mbt-shoes.net/MBT-Chapa-Shoes.html How to Use the Lace Lock on MBT Shoes http://www.cheap-mbt-shoes.net/MBT-M.Walk-Shoes.html How to Install Cleats on MBT Shoes http://www.cheap-mbt-shoes.net/MBT-Tataga-Shoes.html What Are the Benefits of MBT Shoes? http://www.cheap-mbt-shoes.net/MBT-Barabara-Shoes.html About Masai Barefoot Technology Shoes http://www.cheap-mbt-shoes.net/MBT-Sport-2-Shoes.html MBT-The Best Walking Shoes for Leg Problems http://www.cheap-mbt-shoes.net/MBT-Safiri-Shoes.html MBT-Good Walking Shoes for Problem Feet http://www.cheap-mbt-shoes.net/MBT-Tembea-Shoes.html One of the newest products on the market is the MBT anti-shoe http://www.cheap-mbt-shoes.net/MBT-Maliza-Shoes.html The footwear activates and strengthens muscles in most major muscle groups http://www.cheap-mbt-shoes.net/MBT-Lami-Shoes.html You can simply diet and exercise or you can try something different like a cleanse or a new product. http://www.cheap-mbt-shoes.net/MBT-Changa-Shoes.html A shoe which, by its very construction, promotes weight loss and improved health. http://www.cheap-mbt-shoes.net/MBT-Beach-Shoes.html MBT-brand footwear can be found on http://www.cheap-mbt-shoes.net/MBT-Tunisha-Shoes.html How to buy Ed Hardy for cheap http://www.ed-hardy.cc/ed-hardy-clothing.html How to Spot Fake Ed Hardy Shirts http://www.ed-hardy.cc/ed-hardy-t-shirts.html How to Dress Business Casual - Men http://www.nikestarsonsale.com/Kobe-Bryant.html How to Live With Cash Only http://www.nikestarsonsale.com/Lebron-James.html How to Make Compost http://www.nikestarsonsale.com/Kevin-Garnett.html How to Make a Healthy Snack for Teens http://www.nikestarsonsale.com/Paul-Pierce.html How to Write an Executive Summary http://www.nikestarsonsale.com/Tim-Duncan.html How to Know if Someone Likes You Romantically http://www.nikestarsonsale.com/Tracy-McGrady.html How to Express a Dog's Anal Gland http://www.nikestarsonsale.com/Jason-Frederick-Kidd.html How to Write a Check http://www.nikestarsonsale.com/Tony-Parker.html How to Date Vintage Nike Shoes by the Numbers http://www.nikestarsonsale.com/Dirk-Nowitzki.html How to Customize Nike 6.0 Shoes http://www.nikestarsonsale.com/Kevin-Durant.html How to Buy Nike Stock http://www.nikestarsonsale.com/Penny-Hardaway.html How to Clean White Nike Air Shoes http://www.nikestarsonsale.com/Carmelo-Anthony.html How to Clean Nike Shoes http://www.nikestarsonsale.com/Dwight-Howard.html How to Design Nike Shoes http://www.nikestarsonsale.com/Gilbert-Arenas.html How to Create Your Own Nike 6.0 Shoes http://www.nikestarsonsale.com/Vince-Carter.html Types of Nike Shoe Mens Basketball Shoes http://www.nikestarsonsale.com/Allen-Iverson.html
20/4-10 at 03.25 by: discount golf equipment
golf is a very good sport, the following is very useful: There are two <a href=" http://www.golfclubs365.com">Golf Clubs</a> stores,include kinds of <a href=" http://www.golfequipment18.com">golf equipment</a>, <a href=" http://www.buyinggolfonline.com/">wholesale golf clubs</a>. <a href=" http://www.golfclubs365.com/goods-214-Callaway+Diablo+Edge+Irons.html">Callaway Diablo Edge Irons</a> <a href=" http://www.golfclubs365.com/goods-214-Callaway+Diablo+Edge+Irons.html">Callaway Diablo Irons</a> <a href=" http://www.golfclubs365.com/goods-214-Callaway+Diablo+Edge+Irons.html">Callaway Edge Irons</a>
26/10-09 at 01.56 by: bDoc
I'm using the cssmenu.tpl so can you tell me where to put the code: {elseif $node->type == 'link'} <li><a class="fancybox" href="{$node->url}"><span>{$node->menutext}</span></a>
14/8-09 at 10.29 by: Nuno Costa
Nice tip, as usual.
Written by:
Comment:
Write the chars you see in the square
This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)
 
 

CMS Made Simple - Modules/Add-Ons

Re: Custom JQuery Image Rotation?

- Thu, 29 Jul 2010 21:23:39 GMT

I ment the CMSms Gallery module... of course  Cool

but you asked:

Is there another module you'd prefer that makes it easier for the end user?

Re: Announcement: New plug-in SuperSizer

- Thu, 29 Jul 2010 20:40:15 GMT

ok.. here is it.. all fixed and should be ready now to release..

@NikNak please test but here is my test on your images..
http://www.corbensproducts.com/blog/experimental/supersizer.html#NikNakcrop4



Please let me know.. cheers -Jeremy

PS.. I'm headed...

Re: How do I get the latest version of a file

- Thu, 29 Jul 2010 20:28:47 GMT

Hi
Many thanks for your prompt reply, its a great help to a newbe like me. I will try and sort it from hear.

Re: Custom JQuery Image Rotation?

- Thu, 29 Jul 2010 20:21:31 GMT

wait.... i AM using the gallery module...

is there something i'm missing here?

or is gallery a .js you like to use?

Re: CGBlog - A several of things

- Thu, 29 Jul 2010 20:17:22 GMT

never mind fixed it.  there was some google analytics that were not liberalized.  My mistake.

CMS Made Simple Blog

Announcing CMS Made Simple 1.8.1 - Mankara

- Tue, 13 Jul 2010 14:06:34 -0400

This release fixes an important security vulnerability, we recommend that ALL users upgrade as soon as possible. The local inclusion vulnerability fixed is old and affects many previous versions of CMSMS. Therefore it is important for ALL...

Announcing CMS Made Simple 1.8 - Madagascar

- Sat, 03 Jul 2010 20:26:55 -0400

Onwards and upwards we go. The dev team is proud to announce the latest version of your favorite content management system. This version is primarily aimed at rounding out some of the rough edges that our primary audience...

New Site Launch

- Mon, 28 Jun 2010 00:29:44 -0400

After weeks of blood, sweat and tears, we've finally launched our long awaited redesign. It's taken approximately two months from design to implementation to launch, but we're finally here. Along with our main site, we've also reskinned the...

Announcing Geek Moot 2010

- Mon, 21 Jun 2010 10:19:21 -0400

It's that time again. The developers of CMS Made Simple have finalized plans for our yearly user conference. This year, we're thinking much bigger, so join us. On 16-17 September, CMS Made Simple will host the second public Geek...

Announcing CMS Made Simple 1.7.1 - Escade

- Sat, 01 May 2010 09:47:13 -0400

Woot! CMSMS keeps getting better and better. Even though it's only a point release, this version of CMSMS fixes numerous minor bugs and adds some important features. We didn't feel that the list of changes were extensive enough to...