Welcome to the new HowToJoomla!

We've completely revamped the design to make the site easier to read and easier to navigate. We hope you like the changes!

How to view just your component in Joomla! 1.5

July 22, 2008 | by Cory | 11 Comments

Here is a neat little trick I picked up last Friday at the Joomla! 1.5 bootcamp in Austin led by Johan Janssens.

In Joomla! 1.5, if you simply want to display your component without any modules and without your template styles, all you have to do is add "?tmpl=component" or "&tmpl=component" to the end of the URL, depending on whether or not there are already other parameters on the end of the URL.

For example, if you just want to view the component on the home page of the new community.joomla.org site, you simply add "?tmpl=component" to the URL like this: http://community.joomla.org/?tmpl=component.

This trick is really useful for template designers because you can isolate the HTML used in a specific component, so you can determine how best to set up your CSS for styling that component.

Enjoy!

About the Author

Cory WebbIn the years since Joomla! was founded, Cory has built dozens of websites with Joomla! and helped thousands of people find answers to questions about Joomla! through HowToJoomla.net. Cory has also written a book about Joomla titled Beginning Joomla! Web Site Development published by Wrox in April, 2009. In February of 2008, Cory founded Cory Webb Media, LLC, where he provides consulting and web development services for companies of all sizes. You can follow Cory on Twitter @corywebb, or become a fan of Cory Webb Media on Facebook.

Read More

Trackback(0)

Comments (11)Add Comment

0
...
written by Thanks for the tip, July 23, 2008
Thanks for the great tip on styling the componet this will be utilized pretty soon when do some additional modifications to my coupon site.
Thanks again

-wade
0
...
written by mozami, July 24, 2008
Just what the doctor ordered - thanks Cory! I was looking just the other day!
0
...
written by Johan Janssens, July 25, 2008
Hi Cory,

Great to see you picked up a new trick at the bootcamp. By the way did you know that if you add tp=1 you can see the template positions outlined ?

Cheers,

Johan
0
...
written by Joomla Reservation Software, August 12, 2008
Good idea, havent played around with Joomla 1.5 too much guess I need to
0
...
written by Gabe, September 29, 2008
You can also add no_html=1 to remove all template HTML, and just show the component's output.

In Joomla1.0 the equivalent of tmpl=component is to use index2.php in the URL path.

eg: joomlasite.com/index2.php
0
...
written by shan, October 05, 2008
so... why doesn't it work with this site???
62
...
written by Cory, October 06, 2008
This site was built with Joomla! 1.0, and this trick only works in Joomla! 1.5.
0
...
written by Syahadat, November 04, 2008
Thanks, I didn't know we could do that in joomla 1.5.
0
no template on component layout
written by kastri, April 03, 2009
New way Joomla! 1.5 : index.php?option=com_mycomponent&tmpl=component

search & U shall find
http://blog.joomlatools.eu/2008/01/joomla-15-generating-raw-ouput.html
0
Thanks
written by joomla develop site, May 03, 2009
Hi,

its a good tips. I'm a web designer. Thank you
0
Another Method
written by John R., August 04, 2009
Another way to display a component w/o a template is using:

JRequest::setVar('tmpl', 'component');

Write comment

You must be logged in to post a comment. Please register if you do not have an account yet.

busy