No, this is a long standing bug in the Joomla routing that has been actively ignored since shortly before the release of 1.6.
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.
You can assign template styles to menu items. See Backend->Extensions->Templates.
To use this, you need to have another Itemid for the content the link points to.
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/1DmfRg8JmX8J.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.
Hi Anil,
Have you tried adding ‘template=**alternate_template_name**’ to the query string on the URL when you create the link? Obviously replace with your template name, if you’re using SEF you should just be able to add that with a ? at the beginning.
I’ve just tried this on an old J1.5 site (the only one that I have using multiple templates) and it works perfectly. Dunno if it will still work in more recent versions. I haven’t had the need to try.
HTH
Keith
Hi Anil,
Yes, the breadcrumbs will only work for menu items or where you are in an article / category view, again I think you can force the category by adding catid=XX or something similar to the URL and that might fix you breadcrumbs.
But like you, the only reliable way that I’ve found is to create a ‘placeholder menu’ and create the article menu items in that. The advantage of that method is that you can then assign individual modules to that page, if you have the need.
Best
The problem is not the inability to assign the template, but the fact that the routing of Joomla is broken and that the article linker plugin does not take care of that fact. The routers in Joomla do not try to find the Itemid and instead defer that task to external classes, like ContentHelperRoute. The article linker plugin only creates links of the type index.php?option=com_content&view=article&id=<article-id>&catid=<catid>. Notice the missing Itemid.
The routing is broken, because JRoute can not know that it needs to apply ContentHelperRoute or maybe WeblinksHelperRoute to this specific URL. We can also not pre-process the URL in the article linker plugin, since that more or less means, that we need to calculate the URLs of all articles. There are two was to solve this issue:
1. Hardcode the Itemid into the article. That means that you need to first find the article and then copy the URL. The downside (beside the bad usability) is, that the URL becomes invalid if you change the menü assignment of that article.
2. Fix the &*!%€ router, like it was described in the at least 2 bug reports and 3 pull requests that I've created so far. (Besides the fact of the improved performance.)
Hannes
--
Hannes,
Have any of those pull requests ever been responded to?
Best,
Matt
Sent from my phone that uses an open source operating system.
They were closed with differing reasons. One was, that more involvement from the CMS was expected, the other was the fear that it might create a backwards compatibility issue. The backwards compatibility issue would be, that URL extensions are made obsolete.
I think that paper was written by me.
Regarding the router work: it is done and it is 100% backwards compatible. It even reduces duplicate URLs. It is faster, more flexible and A LOT easier to code. It is also 100% UCM compatible.
Hannes
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/7JZ_y-mwbjwJ.
> Regarding the router work: it is done and it is 100% backwards compatible.
> It even reduces duplicate URLs. It is faster, more flexible and A LOT
> easier to code. It is also 100% UCM compatible.
Can we *please* get this into the core?
Regards,
Niels
--
| http://barcamp-wk.de · 1. Barcamp Westküste 30./31. März 2012 |
| http://www.bsds.de · BSDS Braczek Software- und DatenSysteme |
| Webdesign · Webhosting · e-Commerce · Joomla! Content Management |
------------------------------------------------------------------
> Write the automated tests for all possible scenarios.
I try not to be offended. Where are the automated tests for all possible
scenarios regarding captcha and update of phpMailer from 5.1 to 5.2,
which both broke a site of mine on an update from 1.73 to 2.5.1?
Hannes has done a great efford to improve the router. It passes all
*existent* tests. That's all we can ever ask for.
Might take me a few days, but expect those tests soon.
Hannes
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/F8aDPg1ueJ0J.
> Might take me a few days, but expect those tests soon.
Great news, thank you, Hannes!
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
I think the whole problem is that the original idea of displaying a template based on a menu item was just a quick bandaid solution.
The problem is not that routing is broken. The problem is that it was a flawed solution to begin with. The approach shouldn't be that a template is assigned to a menu item. The approach should be that an element requests a template.If you want to choose a template, there needs to be a rational decision process. One way to do that is for each displayable element to be able to request a template. That is, a module, component, menu item, etc. can request a certain template. That request is stored in a separate table with some form of precedence data. So, for each template in the table, you might have multiple entries. And then, for templates that exist in the table (no entries if it's not requests for a template), you choose based on some precedence scheme. It could be a simple as an ordering column or as complex as assigning precedence to certain types of elements. Look, just before the html is rendered, we know what's going to be displayed. We have all the information we need to choose a template. Why not take advantage of that.If you wan't to break free of any implied problems with routing and template assignment, the simplest approach would be to take routing completely out of the equation. Only then will you be totally liberated from Itemid. After all, that's where it all began. The dreaded Itemid. Who needs it? Really. Think about it.
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/iuImM-xF3boJ.
Tell me how to write the tests and I will have a go.
However, the current situation raises the question why apparently
features have been added to the CMS without tests and now they are
required for this feature. Looks like the last time anything substantial
was done to the unittests in the CMS repo was about a year ago (March
2011) So neither 1.7 nor 2.5 were covered by them.
Hannes
Am 15.02.2012 07:36, schrieb Hannes Papenberg:
>
> Might take me a few days, but expect those tests soon.
>
> Hannes
>
> Am 15.02.2012 00:50 schrieb "elin" <elin....@gmail.com
> <mailto:elin....@gmail.com>>:
> <mailto:joomla-de...@googlegroups.com>.
> To unsubscribe from this group, send email to
> joomla-dev-gene...@googlegroups.com
> <mailto:joomla-dev-general%2Bunsu...@googlegroups.com>.
Ok, I tried to write those tests today and as it seems, the unittests of
the CMS are completely non-funtional.
However, the current situation raises the question why apparently
features have been added to the CMS without tests and now they are
required for this feature. Looks like the last time anything substantial
was done to the unittests in the CMS repo was about a year ago (March
2011) So neither 1.7 nor 2.5 were covered by them.
Actually, these would be cms-only tests. Testing would mean to create a dummy component with a dummy router that tests all possible URLs that can come out of the rules in the router plugin. So you see that the main part of this is not part of the platform.
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.