News Feed E-mail

Get How-To's right in your inbox. Subscribe to the HowToJoomla! news feed e-mail. Just enter your email address here:

Delivered by FeedBurner

Login






Lost Password?
No account yet? Register

Affiliates

Azrul's JomComment
JoomlaShack
iJoomla
The Joomla! Store
Member of W3C Sites dot com
How to display a component's output and nothing else PDF Print E-mail
Written by Cory   
Saturday, 28 October 2006

I know it sounds weird, but I came across a situation in which I needed to see a component's output and nothing else. That allowed me to better debug the HTML that was coming from the component.

Special thanks to Dean Marshall for showing me this nifty little trick.

It's pretty simple, just follow these steps:

  • Create a menu item that links to your component.
  • Once you have created your menu item, click on that menu item in your Menu Manager like you were going to edit the menu item.
  • Next to "URL", you should see something like "index.php?option=com_yourcomponent&...". Copy that URL.
  • In the browser address bar, type the domain name and path to your website along with the URL information you copied in the previous step.
  • Change "index.php" to "index2.php", and voila! You are now looking at just your component's output.
Trackback(0)
Comments (5)add comment
Hank Hill: ...
Thanks! That's awesome. I have been trying to figure out how to do that!
1

report abuse
vote down
vote up
December 16, 2006
Votes: +0
Cool, just what I needed, but let me ask: Is it save to edit that index2.php layout a bit (move text, add colours/images)?
2

report abuse
vote down
vote up
December 16, 2006
Votes: +0
@Hank: I'm glad you found this useful. Oh, and tell Bobby I said hello. smilies/smiley.gif

@Alex2: It is not safe to edit index2.php, and I do not recommend it. The way you would change the layout is by either changing your template's CSS, or by changing the code in the component you are looking at.
3

report abuse
vote down
vote up
December 16, 2006
Votes: +0
Bear in mind that index2.php will still process the output and make changes - ie urls become relative, and it does put in header and css information.

I'm not sure how to get nothing but your output but I'm looking!!!
4

report abuse
vote down
vote up
February 22, 2007
Votes: +0
hi bro.. i have a little case, can u change the button readmore or else to index2.php, or frist load web call index2.php first time.. can u help me ??
5

report abuse
vote down
vote up
May 17, 2007
Votes: +0

Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
smile
wink
laugh
grin
angry
sad
shocked
cool
tongue
kiss
cry
smaller | bigger

busy
 
Tag it:
Delicious
Digg
Technorati
< Prev   Next >
Advertisement

About HowToJoomla

HowToJoomla was started in September 2006 by me, Cory Webb, a long-time Mambo/Joomla user with a desire to give back to the community that has given so much to him.

HowToJoomla is not the best, most comprehensive Joomla tips site out there. That's not the goal. The goal is to share some of the knowledge and experience that I have gained through years of using the world's best content managment system. I hope that you will find this site useful and visit often. As I come across new tips and ideas, I will post them here for all to see.

I hope you enjoy using HowToJoomla and find it very useful.

Please take some time to read the Disclaimer.

Thanks for visiting!

About Me

I am a 28-year-old husband and father of a beautiful baby girl named Lucy. I have a degree in Electrical Engineering from the University of Texas at Austin, an MBA from Baylor University, and over 4 years experience working with the Mambo/Joomla CMS.

On February 1, 2008, I started a web design, development, and consulting company specializing in designing and developing custom Joomla-powered websites. The new company is aptly named Cory Webb Media, LLC. The double meaning is purely unintentional, but with a last name like "Webb" it is difficult to escape the obvious puns. If you are looking for professional assistance with your website, please feel free to contact me to discuss your project.

I also run HowToJoomla, CoryWebb.com (my personal website/blog), and JoomlaForm.com (a site dedicated to promoting good design in the Joomla! community). In my spare time (if there is such a thing), I volunteer with the youth ministry at my church.

Copyright © 2006 - Cory Webb Media, LLC - All rights reserved.
Powered by Joomla!