Persistent tmpl=component URL Variable

User avatar
machadoug
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 107
Joined: Fri Jun 23, 2006 4:41 pm
Location: Joinville - Santa Catarina - Brazil
Contact:

Persistent tmpl=component URL Variable

Postby machadoug » Wed Dec 24, 2008 1:00 pm

1. A summary of the background of the issue/feature request:
When someone uses the &tmpl=component in the query string is because there is a need to navigate the website without the modules, menus, and any other template fancy stuff.

2. The goals that are to be achieved:
Therefore when you do use the tmpl=component in your query string, Joomla should append &tmpl=component to all links in that component, at least for core components.
In the Backend components there also should be an option whether you want to see the toolbar or not. In most cases I need the toolbar and it is not there.

I know there will be a great amount of work to be done, because there will be added a small code to all pages. Therefore I believe it would be wise to add a function to the JURI class to build the links or the whole <a> tag, so future changes like this one will be done with ease.

3. Thoughts on how your proposal will affect change management:
    Does NOT affect backward compatibility
    Will increase the possibilities I have with Joomla, I'll be able to run a component from an Iframe

Regards,
Douglas Machado :: Joomla Extension Developer :: [<o>]
My Joomla Extensions: https://idealExtensions.com
Contact Enhanced: https://idealextensions.com/joomla-exte ... anced.html

sh0em0nkey
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Sat Oct 04, 2008 4:24 am

Re: Persistent tmpl=component URL Variable

Postby sh0em0nkey » Wed Jul 15, 2009 12:26 am

This is exactly the feature I am looking for.

Has a white paper been made, in progress?

Has anyone done any work on this?

I would really like to learn how to do this.

User avatar
machadoug
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 107
Joined: Fri Jun 23, 2006 4:41 pm
Location: Joinville - Santa Catarina - Brazil
Contact:

Re: Persistent tmpl=component URL Variable

Postby machadoug » Wed Jul 15, 2009 12:34 am

As far as I know this hasn't been taken into consideration.

Every component that I develop I create this feature manually. It is not that hard really you just have to check whether the tmpl is set and include it to the URL query string in case it is set.

Regards,
Douglas Machado :: Joomla Extension Developer :: [<o>]
My Joomla Extensions: https://idealExtensions.com
Contact Enhanced: https://idealextensions.com/joomla-exte ... anced.html

sh0em0nkey
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Sat Oct 04, 2008 4:24 am

Re: Persistent tmpl=component URL Variable

Postby sh0em0nkey » Wed Jul 15, 2009 12:55 am

Thanks much.

So I guess, it would have to be something like:

Code: Select all

$tmpl = "&tmpl=component");
$useTmpl = JRequest:getString("tmpl")
if ($useTmpl) {
JRoute::_("index.php?option=example&task=view".$tmpl);
} else {
JRoute::_("index.php?option=example&task=view");
}


??

It still doesn't really suit me well though, seeing how I wanted it to work globally, on all of my components such as CB, JoomGallery, and everything else I run. That's a lot of route commands to modify...

I was thinking that maybe this could be implemented somehow using a Joomla plugin, with the onAfterRoute function.

Or maybe there is a way to do this with sh404sef...

I dunno. But boy do I want to.

Thanks.

User avatar
machadoug
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 107
Joined: Fri Jun 23, 2006 4:41 pm
Location: Joinville - Santa Catarina - Brazil
Contact:

Re: Persistent tmpl=component URL Variable

Postby machadoug » Wed Jul 15, 2009 1:19 pm

Well, I would write something simpler:

Code: Select all

$tmpl = "";
if (JRequest:getString("tmpl")) {
 $tmpl = "&tmpl=component";
}
JRoute::_("index.php?option=example&task=view".$tmpl);


I know it is a pain to modify all routes.
If you have the knowledge you can modify the JRoute Class.
http://ideal.fok.com.br/documentation/j ... ce.php#l26

It shouldn't be that hard.

Regards,
Douglas Machado :: Joomla Extension Developer :: [<o>]
My Joomla Extensions: https://idealExtensions.com
Contact Enhanced: https://idealextensions.com/joomla-exte ... anced.html

User avatar
SaVaTaGe
Joomla! Intern
Joomla! Intern
Posts: 75
Joined: Mon Jan 23, 2006 7:22 pm

Re: Persistent tmpl=component URL Variable

Postby SaVaTaGe » Wed Jul 22, 2009 8:11 am

I have been developing a component which always needs to give an output(view) without any template, I use tmpl=component that works well, but my component has menu parameters, I need to add tmpl=component to component URL in menu item edit screen

anyone has idea about this?

User avatar
SaVaTaGe
Joomla! Intern
Joomla! Intern
Posts: 75
Joined: Mon Jan 23, 2006 7:22 pm

Re: Persistent tmpl=component URL Variable

Postby SaVaTaGe » Wed Jul 22, 2009 8:26 am

SaVaTaGe wrote:I have been developing a component which always needs to give an output(view) without any template, I use tmpl=component that works well, but my component has menu parameters, I need to add tmpl=component to component URL in menu item edit screen

anyone has idea about this?


Fixed:

Code: Select all

//Use only component template
JRequest::setVar('tmpl','component');


in component controller constructor

User avatar
SaVaTaGe
Joomla! Intern
Joomla! Intern
Posts: 75
Joined: Mon Jan 23, 2006 7:22 pm

Re: Persistent tmpl=component URL Variable

Postby SaVaTaGe » Wed Jul 22, 2009 10:01 am

Another problem: Even if tmpl=component is defined, page always include the template stylesheet.

anyone has information about how to remove site template stylesheet?

Netmate
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Sep 25, 2009 9:42 am

Re: Persistent tmpl=component URL Variable

Postby Netmate » Fri Sep 25, 2009 9:50 am

SaVaTaGe wrote:Another problem: Even if tmpl=component is defined, page always include the template stylesheet.

anyone has information about how to remove site template stylesheet?

Adding format=raw to URL may help you.


Return to “Feature Requests - White Papers - Archived”

Who is online

Users browsing this forum: No registered users and 1 guest