0

So I have this weird problem.

I am calling

JRoute::_('index.php?option=com_example&view=foo&layout=bar') 

..from two different view-layouts. And Joomla! is generating different SEF-URL based on which layout that I am calling the above code from.

What I expect is that, If I generate an SEF URL it should point to that same exact resource with same exact URL, no matter where I am calling this from, since everything is pretty specific. viz. the component name, the view name, and the layout name.

  • Have you built a router for your component? – Alex Mehan Jun 3 '18 at 23:54
0

You need to build router for your component read moere about here: https://docs.joomla.org/J3.x:Supporting_SEF_URLs_in_your_component

  • Link-only answers are low value on all Stack Exchange sites because if the link location dies or us moves, then your answer is rendered useless to researchers. Please always write the bulk of your suggested solution as the major portion of your answer. Providing a link to documentation is of course a good idea -- so don't delete it when you write your edit. – mickmackusa Dec 2 '18 at 10:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.