{"id":3251,"date":"2014-05-22T17:21:33","date_gmt":"2014-05-22T17:21:33","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2014\/05\/22\/menu-item-2\/"},"modified":"2024-01-23T13:10:58","modified_gmt":"2024-01-23T18:10:58","slug":"joomla-create-menu-item","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/","title":{"rendered":"Creating a Menu Item for your Joomla 3 Component"},"content":{"rendered":"<p>So far in this <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/\">Joomla tutorial series<\/a> we\u2019ve been testing our new component by visiting our Joomla site and adding <span style=\"color: red;\">index.php?option=com_helloworld<\/span> to the url, as in:<\/p>\n<p class=\"white_box\">https:\/\/example.com\/<span style=\"color: red;\">index.php?option=com_helloworld<\/span><\/p>\n<p>In this tutorial, we will show you how to create a <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/add-menu-item\/\">menu item<\/a> for your component. This will allow you to add a link to your menu that points to your component with a URL similar to:<\/p>\n<p class=\"white_box\">https:\/\/example.com\/<span style=\"color: red;\">hello-world<\/span><\/p>\n<h2>To create a menu item:<\/h2>\n<ol class=\"article_list\">\n<li><strong>Decide which view<\/strong>. Components can have multiple <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/add-new-view\/\">views<\/a>. Decide on which view you want to create a menu item for.<\/li>\n<li><strong>Go to tmpl folder<\/strong>. Navigate to the <strong>tmpl<\/strong> folder of the view you chose in step 1.<\/li>\n<li><strong>Create default.xml<\/strong>. Create a default.xml file in the tmpl folder with the following text:\n<pre class=\"code_block\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt; &lt;metadata&gt;         &lt;layout title=\"<span style=\"color: red;\">Title<\/span>\"&gt;                 &lt;message&gt;<span style=\"color: red;\">message<\/span>&lt;\/message&gt;         &lt;\/layout&gt; &lt;\/metadata&gt;<\/pre>\n<p><a href=\"\/support\/images\/stories\/edu\/joomla-3\/create-component\/title-and-message-of-menu-item.png\" rel=\"lightbox-0\"><img decoding=\"async\" class=\"std_ss\" style=\"float: right; margin: 0px 0px 15px 15px;\" src=\"\/support\/images\/stories\/edu\/joomla-3\/create-component\/title-and-message-of-menu-item.png\" alt=\"Title and Message of Menu Item\"><\/a><\/p>\n<div style=\"clear: both;\"><\/div>\n<p>When going through the process of creating a menu item, the <strong>Title<\/strong> and <strong>message<\/strong> in the code above will be shown in the listing of item types (as in the screenshot to the right):<\/p>\n<div style=\"clear: both;\"><\/div>\n<\/li>\n<\/ol>\n<h2>Testing our new menu item<\/h2>\n<p>The whole process thus far of creating a new menu item for our component has been actually quite easy. If everything\u2019s not \u201cclicking\u201d yet for you, review the following screenshot (<em>hopefully it\u2019ll tie everything together<\/em>).<\/p>\n<p><a href=\"\/support\/images\/stories\/edu\/joomla-3\/create-component\/follow-route-of-component-menu-item-creation.png\" rel=\"lightbox-0\"><img decoding=\"async\" class=\"std_ss\" style=\"max-width: 100%; max-height: 500px;\" src=\"\/support\/images\/stories\/edu\/joomla-3\/create-component\/follow-route-of-component-menu-item-creation.png\" alt=\"How to create a new menu item\"><\/a><\/p>\n<div style=\"clear: both;\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>So far in this Joomla tutorial series we\u2019ve been testing our new component by visiting our Joomla site and adding index.php?option=com_helloworld to the url, as in: https:\/\/example.com\/index.php?option=com_helloworld In this tutorial, we will show you how to create a menu item for your component. This will allow you to add a link to your menu that<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/\"> Read More ><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4403],"tags":[4404],"class_list":["post-3251","post","type-post","status-publish","format-standard","hentry","category-joomla","tag-joomla-v3"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Creating a Menu Item for your Joomla 3 Component | InMotion Hosting<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Creating a Menu Item for your Joomla 3 Component | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"So far in this Joomla tutorial series we\u2019ve been testing our new component by visiting our Joomla site and adding index.php?option=com_helloworld to the url, as in: https:\/\/example.com\/index.php?option=com_helloworld In this tutorial, we will show you how to create a menu item for your component. This will allow you to add a link to your menu that Read More &gt;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2014-05-22T17:21:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-23T18:10:58+00:00\" \/>\n<meta name=\"author\" content=\"Brad Markle\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Brad Markle\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/\"},\"author\":{\"name\":\"Brad Markle\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf\"},\"headline\":\"Creating a Menu Item for your Joomla 3 Component\",\"datePublished\":\"2014-05-22T17:21:33+00:00\",\"dateModified\":\"2024-01-23T18:10:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/\"},\"wordCount\":221,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"keywords\":[\"Joomla v3\"],\"articleSection\":[\"Joomla\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/\",\"name\":\"Creating a Menu Item for your Joomla 3 Component | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2014-05-22T17:21:33+00:00\",\"dateModified\":\"2024-01-23T18:10:58+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Creating a Menu Item for your Joomla 3 Component\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf\",\"name\":\"Brad Markle\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/bradm\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Creating a Menu Item for your Joomla 3 Component | InMotion Hosting","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/","og_locale":"en_US","og_type":"article","og_title":"Creating a Menu Item for your Joomla 3 Component | InMotion Hosting","og_description":"So far in this Joomla tutorial series we\u2019ve been testing our new component by visiting our Joomla site and adding index.php?option=com_helloworld to the url, as in: https:\/\/example.com\/index.php?option=com_helloworld In this tutorial, we will show you how to create a menu item for your component. This will allow you to add a link to your menu that Read More >","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2014-05-22T17:21:33+00:00","article_modified_time":"2024-01-23T18:10:58+00:00","author":"Brad Markle","twitter_card":"summary_large_image","twitter_creator":"@InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Brad Markle","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/"},"author":{"name":"Brad Markle","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf"},"headline":"Creating a Menu Item for your Joomla 3 Component","datePublished":"2014-05-22T17:21:33+00:00","dateModified":"2024-01-23T18:10:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/"},"wordCount":221,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"keywords":["Joomla v3"],"articleSection":["Joomla"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/","name":"Creating a Menu Item for your Joomla 3 Component | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2014-05-22T17:21:33+00:00","dateModified":"2024-01-23T18:10:58+00:00","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-create-menu-item\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"Creating a Menu Item for your Joomla 3 Component"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf","name":"Brad Markle","url":"https:\/\/www.inmotionhosting.com\/support\/author\/bradm\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":{"id":4403,"name":"Joomla","slug":"joomla","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/"},"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/3251","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=3251"}],"version-history":[{"count":8,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/3251\/revisions"}],"predecessor-version":[{"id":108785,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/3251\/revisions\/108785"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=3251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=3251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=3251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}