Dokumentationen>>Sitemap>>Erläuterungen zu der Version 2.0.J


Erstellen der XML-Beschreibung einer Ansicht

Es gibt momentan zweo mögliche Typen die installiert werden können, ein view

<?xml version="1.0" encoding="utf-8"?>
<install type="rdsitemap" subtype="view" version="2.0.J">
	<title>Content</title>
	<creationDate>17 Aug 2007</creationDate>
	<author>Robert Deutz</author>
	<copyright>This component in released under the GNU/GPL License</copyright>
	<authorEmail>contact@run-digital.com</authorEmail>
	<authorUrl>www.run-digital.com</authorUrl>
	<version>1.0</version>
	<description>This is a View for the Run-Digital Sitemap Component, it shows the content</description>
	<sql>
        <![CDATA[
SELECT
  c.title as title,
  s.title as section,
  cat.title as category,
  CONCAT('index.php?option=com_content&view=article&id=', c.id)  as link		
FROM
  #__content as c,
  #__sections as s,
  #__categories as cat
WHERE 
  c.sectionid = s.id 
  AND c.catid = cat.id
  AND c.state = '1'
  AND s.published = '1'
  AND cat.published = '1'
  AND ( c.publish_up = '0000-00-00 00:00:00' OR c.publish_up <= '{NOW}' )
  AND ( c.publish_down = '0000-00-00 00:00:00' OR c.publish_down >= '{NOW}' )
  AND c.access <= '{USER_GID}'
  {AND c.sectionid IN ({sectionid}) }
  ORDER BY  s.title, cat.title,c.title
]]>
	</sql>
	<params>
		<param name="sectionid" type="text" default="" label="SECTIONID" description="DESCSECTIONID" />
	</params>
</install>


und ein menu

<?xml version="1.0" encoding="utf-8"?>
<install type="rdsitemap" subtype="menu" version="2.0.J">
	<title>Menu</title>
	<creationDate>20 Aug 2007</creationDate>
	<author>Robert Deutz</author>
	<copyright>This component in released under the GNU/GPL License</copyright>
	<authorEmail>contact@run-digital.com</authorEmail>
	<authorUrl>www.run-digital.com</authorUrl>
	<version>1.0</version>
	<description>This is a View for the Run-Digital Sitemap Component, it shows menu</description>
	<sql>
        <![CDATA[
SELECT
  m.*
FROM
  #__menu as m
WHERE
  m.published = '1'
  AND m.access <= '{USER_GID}'
  {AND m.menutype = '{menutype}' }
  ORDER BY m.menutype,m.parent, m.sublevel, m.ordering
      ]]>
	</sql>
	<params>
		<param name="menutype" type="text" default="" label="MENUTYPE" description="DESCMENUTYPE" />
	</params>
</install>


Die Unterschiede in der XML-Beschreibung sind nicht sonderlich groß. Bei der Verarbeitung wird der Typ Menu, aber anders behandelt wie der View. Das Menu wird zusätzlich noch sortiert, dazu sind die folgenden Felder unbedingt in SQL zu liefern

  • sublevel
  • parent
  • title