I am trying to write a custom component router. I have these admin and site uri structures: http://localhost/administrator/index.php?option=com_{component_name}&...
and http://localhost/index.php/{language_code}/{an_alias}/...
. Is there a way to get these uri structures programmatically. The admin part is okay, but by the site part I am lost. I can add any menupoint with a generated alias, which is not predictable. Is there a way to get this info from the joomla site router or enforce a constraint on the menupoint?
Currently I have a com_example/views/example/tmpl/default.xml
:
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_CANTEEN_TITLE">
<message><![CDATA[COM_CANTEEN_DESCRIPTION]]></message>
</layout>
</metadata>
which is enough to add a site menupoint, which points to the component. It would be nice to add multilingual menupoint title and alias to this, so it would not be possible to add a menupoint with a different alias. Actually I don't want to follow the MVC structure by the component, I'd like to route and handle requests from the entry, let's call it com_example/example.php
. It would be nice to have this template xml file in the com_example/Example/presentation/menupoints/
if that is possible.