{"id":1587,"date":"2012-07-19T12:43:57","date_gmt":"2012-07-19T12:43:57","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2012\/07\/19\/jfactory-get-document\/"},"modified":"2021-08-16T23:39:15","modified_gmt":"2021-08-17T03:39:15","slug":"jfactory-get-document","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/","title":{"rendered":"Joomla 2.5 Templates &#8211; JFactory::getDocument()"},"content":{"rendered":"<p>In our continued effort to <a href=\"\/support\/website\/working-with-images-in-premium-web-builder\/\">review the PHP code in the Joomla 2.5 Beez2 template<\/a>, we come across the following code:<\/p>\n<pre class=\"code_block\">\/\/ get params\n$color              = $this-&gt;params-&gt;get('templatecolor');\n$logo               = $this-&gt;params-&gt;get('logo');\n$navposition        = $this-&gt;params-&gt;get('navposition');\n$app                = JFactory::getApplication();\n<strong>$doc        = JFactory::getDocument();<\/strong><\/pre>\n<p>Our specific focus in this article will be $doc = JFactory::getDocument().<\/p>\n<h2>What is getDocument?<\/h2>\n<p>According to official documentation, getDocument returns the global document object as a JDocument object type. Our next step is to find out what is contained within this global document object.<\/p>\n<h2>What is included within JDocument?<\/h2>\n<p>Because we want to find the contents of JDocument, which is put into the $doc variable, we will adjust our template\u2019s index.php to print out this data.<\/p>\n<table class=\"article_table\">\n<tbody>\n<tr>\n<th>Updated Code<\/th>\n<th>Screenshot of the contents of $doc<\/th>\n<\/tr>\n<tr>\n<td>\n<pre class=\"code_block\">\/\/ get params\n$color              = $this-&gt;params-&gt;get('templatecolor');\n$logo               = $this-&gt;params-&gt;get('logo');\n$navposition        = $this-&gt;params-&gt;get('navposition');\n$app                = JFactory::getApplication();\n<strong>$doc        = JFactory::getDocument();<\/strong>\n$templateparams     = $app-&gt;getTemplate(true)-&gt;params;\n<strong>echo \"&lt;pre&gt;\"; print_r($doc); echo \"&lt;\/pre&gt;\"; die();<\/strong><\/pre>\n<\/td>\n<td><a href=\"\/support\/wp-content\/uploads\/2012\/07\/edu_joomla25_create-template_jdocumenthtml.gif\" rel=\"lightbox-0\"><img decoding=\"async\" width=\"728\" height=\"860\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/edu_joomla25_create-template_jdocumenthtml.gif\" class=\"optimized-lcp-image\" alt=\"jdocumenthtml\" loading=\"eager\" fetchpriority=\"high\" sizes=\"(max-width: 768px) 100vw, 768px\"><\/a>\n<div style=\"clear: both;\"><\/div>\n<\/td>\n<\/tr>\n<tr>\n<th colspan=\"2\">Contents of $doc<\/th>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<pre class=\"code_block\">JDocumentHTML Object\n(\n    [_links] =&gt; Array\n        (\n            [\/joomla25\/index.php?format=feed&amp;type=rss] =&gt; Array\n                (\n                    [relation] =&gt; alternate\n                    [relType] =&gt; rel\n                    [attribs] =&gt; Array\n                        (\n                            [type] =&gt; application\/rss+xml\n                            [title] =&gt; RSS 2.0\n                        )\n\n                )\n\n            [\/joomla25\/index.php?format=feed&amp;type=atom] =&gt; Array\n                (\n                    [relation] =&gt; alternate\n                    [relType] =&gt; rel\n                    [attribs] =&gt; Array\n                        (\n                            [type] =&gt; application\/atom+xml\n                            [title] =&gt; Atom 1.0\n                        )\n\n                )\n\n        )\n\n    [_custom] =&gt; Array\n        (\n        )\n\n    [template] =&gt; beez_20\n    [baseurl] =&gt; \/joomla25\n    [params] =&gt; JRegistry Object\n        (\n            [data:protected] =&gt; stdClass Object\n                (\n                    [wrapperSmall] =&gt; 53\n                    [wrapperLarge] =&gt; 72\n                    [logo] =&gt; images\/joomla_black.gif\n                    [sitetitle] =&gt; Joomla!\n                    [sitedescription] =&gt; Open Source Content Management\n                    [navposition] =&gt; left\n                    [templatecolor] =&gt; personal\n                )\n\n        )\n\n    [_file] =&gt; \/home\/inmoti6\/bradm.inmotiontesting.com\/joomla25\/templates\/beez_20\/index.php\n    [_template:protected] =&gt; \n    [_template_tags:protected] =&gt; Array\n        (\n        )\n\n    [_caching:protected] =&gt; \n    [title] =&gt; My New Page Title\n    [description] =&gt; This is my custom Meta Description\n    [link] =&gt; \n    [base] =&gt; https:\/\/bradm.inmotiontesting.com\/joomla25\/\n    [language] =&gt; en-gb\n    [direction] =&gt; ltr\n    [_generator] =&gt; Joomla! - Open Source Content Management\n    [_mdate] =&gt; \n    [_tab] =&gt;   \n    [_lineEnd] =&gt; \n\n    [_charset] =&gt; utf-8\n    [_mime] =&gt; text\/html\n    [_namespace] =&gt; \n    [_profile] =&gt; \n    [_scripts] =&gt; Array\n        (\n            [\/joomla25\/media\/system\/js\/mootools-core.js] =&gt; Array\n                (\n                    [mime] =&gt; text\/javascript\n                    [defer] =&gt; \n                    [async] =&gt; \n                )\n\n            [\/joomla25\/media\/system\/js\/core.js] =&gt; Array\n                (\n                    [mime] =&gt; text\/javascript\n                    [defer] =&gt; \n                    [async] =&gt; \n                )\n\n            [\/joomla25\/media\/system\/js\/caption.js] =&gt; Array\n                (\n                    [mime] =&gt; text\/javascript\n                    [defer] =&gt; \n                    [async] =&gt; \n                )\n\n            [https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.7\/jquery.min.js] =&gt; Array\n                (\n                    [mime] =&gt; text\/javascript\n                    [defer] =&gt; \n                    [async] =&gt; \n                )\n\n            [https:\/\/bradm.inmotiontesting.com\/joomla25\/modules\/mod_unite_nivoslider\/tmpl\/js\/jquery.nivo.slider.pack.js] =&gt; Array\n                (\n                    [mime] =&gt; text\/javascript\n                    [defer] =&gt; \n                    [async] =&gt; \n                )\n\n            [\/joomla25\/media\/system\/js\/mootools-more.js] =&gt; Array\n                (\n                    [mime] =&gt; text\/javascript\n                    [defer] =&gt; \n                    [async] =&gt; \n                )\n\n        )\n\n    [_script] =&gt; Array\n        (\n            [text\/javascript] =&gt; window.addEvent('load', function() {\n                new JCaption('img.caption');\n            });\n        )\n\n    [_styleSheets] =&gt; Array\n        (\n            [https:\/\/bradm.inmotiontesting.com\/joomla25\/modules\/mod_unite_nivoslider\/tmpl\/css\/nivo-slider.css] =&gt; Array\n                (\n                    [mime] =&gt; text\/css\n                    <div class=\"media\"><\/div> =&gt; \n                    [attribs] =&gt; Array\n                        (\n                        )\n\n                )\n\n            [https:\/\/bradm.inmotiontesting.com\/joomla25\/modules\/mod_unite_nivoslider\/tmpl\/themes\/default\/default.css] =&gt; Array\n                (\n                    [mime] =&gt; text\/css\n                    <div class=\"media\"><\/div> =&gt; \n                    [attribs] =&gt; Array\n                        (\n                        )\n\n                )\n\n        )\n\n    [_style] =&gt; Array\n        (\n        )\n\n    [_metaTags] =&gt; Array\n        (\n            [http-equiv] =&gt; Array\n                (\n                    [content-type] =&gt; text\/html\n                )\n\n            [standard] =&gt; Array\n                (\n                    [keywords] =&gt; joomla 2.5 testing, metadata options, meta keywords, learn joomla, joomla 2.5 tutorial\n                    [rights] =&gt; \n                    [robots] =&gt; index, follow\n                )\n\n        )\n\n    [_engine] =&gt; \n    [_type] =&gt; html\n    [_errors:protected] =&gt; Array\n        (\n        )\n\n)<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>As you can see in the data above, the $doc variable has information about:<\/p>\n<ol>\n<li>RSS feeds within the page<\/li>\n<li>Site information, such as the title and description<\/li>\n<li>References to .js javascript and .css CSS files being loaded<\/li>\n<li>\u2026 and more<\/li>\n<\/ol>\n<h2>How is $doc \/ JDocument used within the template?<\/h2>\n<p>The only reference to $doc in this particular template is in the following code:<\/p>\n<pre class=\"code_block\">$doc-&gt;addScript($this-&gt;baseurl.'\/templates\/'.$this-&gt;template.'\/javascript\/md_stylechanger.js', 'text\/javascript', true);<\/pre>\n<p>Based upon <strong>addScript<\/strong>, it appears we are telling Joomla to load another javascript file into the page, <em>\/javascript\/md_stylechanger.js<\/em>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our continued effort to review the PHP code in the Joomla 2.5 Beez2 template, we come across the following code: \/\/ get params $color = $this-&gt;params-&gt;get(&#8216;templatecolor&#8217;); $logo = $this-&gt;params-&gt;get(&#8216;logo&#8217;); $navposition = $this-&gt;params-&gt;get(&#8216;navposition&#8217;); $app = JFactory::getApplication(); $doc = JFactory::getDocument(); Our specific focus in this article will be $doc = JFactory::getDocument(). What is getDocument? According to<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/\"> 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,82],"tags":[2113],"class_list":["post-1587","post","type-post","status-publish","format-standard","hentry","category-joomla","category-joomla-2-5","tag-joomla-v2-5"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Joomla 2.5 Templates - JFactory::getDocument() | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"In the Beez2 template, JFactory::getDocument is called in order to tell Joomla to include an additional javascript file in the page.\" \/>\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-2-5\/jfactory-get-document\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Joomla 2.5 Templates - JFactory::getDocument() | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"In the Beez2 template, JFactory::getDocument is called in order to tell Joomla to include an additional javascript file in the page.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/\" \/>\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=\"2012-07-19T12:43:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-17T03:39:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/edu_joomla25_create-template_jdocumenthtml.gif\" \/>\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=\"3 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-2-5\/jfactory-get-document\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/\"},\"author\":{\"name\":\"Brad Markle\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf\"},\"headline\":\"Joomla 2.5 Templates &#8211; JFactory::getDocument()\",\"datePublished\":\"2012-07-19T12:43:57+00:00\",\"dateModified\":\"2021-08-17T03:39:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/\"},\"wordCount\":196,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/edu_joomla25_create-template_jdocumenthtml.gif\",\"keywords\":[\"Joomla v2.5\"],\"articleSection\":[\"Joomla\",\"Joomla 2.5\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/\",\"name\":\"Joomla 2.5 Templates - JFactory::getDocument() | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/edu_joomla25_create-template_jdocumenthtml.gif\",\"datePublished\":\"2012-07-19T12:43:57+00:00\",\"dateModified\":\"2021-08-17T03:39:15+00:00\",\"description\":\"In the Beez2 template, JFactory::getDocument is called in order to tell Joomla to include an additional javascript file in the page.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/#primaryimage\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/edu_joomla25_create-template_jdocumenthtml.gif\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/edu_joomla25_create-template_jdocumenthtml.gif\",\"width\":728,\"height\":860,\"caption\":\"jdocumenthtml\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Joomla 2.5 Templates &#8211; JFactory::getDocument()\"}]},{\"@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":"Joomla 2.5 Templates - JFactory::getDocument() | InMotion Hosting","description":"In the Beez2 template, JFactory::getDocument is called in order to tell Joomla to include an additional javascript file in the page.","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-2-5\/jfactory-get-document\/","og_locale":"en_US","og_type":"article","og_title":"Joomla 2.5 Templates - JFactory::getDocument() | InMotion Hosting","og_description":"In the Beez2 template, JFactory::getDocument is called in order to tell Joomla to include an additional javascript file in the page.","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2012-07-19T12:43:57+00:00","article_modified_time":"2021-08-17T03:39:15+00:00","og_image":[{"url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/edu_joomla25_create-template_jdocumenthtml.gif","type":"","width":"","height":""}],"author":"Brad Markle","twitter_card":"summary_large_image","twitter_creator":"@InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Brad Markle","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/"},"author":{"name":"Brad Markle","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf"},"headline":"Joomla 2.5 Templates &#8211; JFactory::getDocument()","datePublished":"2012-07-19T12:43:57+00:00","dateModified":"2021-08-17T03:39:15+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/"},"wordCount":196,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/edu_joomla25_create-template_jdocumenthtml.gif","keywords":["Joomla v2.5"],"articleSection":["Joomla","Joomla 2.5"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/","name":"Joomla 2.5 Templates - JFactory::getDocument() | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/#primaryimage"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/edu_joomla25_create-template_jdocumenthtml.gif","datePublished":"2012-07-19T12:43:57+00:00","dateModified":"2021-08-17T03:39:15+00:00","description":"In the Beez2 template, JFactory::getDocument is called in order to tell Joomla to include an additional javascript file in the page.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/#primaryimage","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/edu_joomla25_create-template_jdocumenthtml.gif","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/edu_joomla25_create-template_jdocumenthtml.gif","width":728,"height":860,"caption":"jdocumenthtml"},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-2-5\/jfactory-get-document\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"Joomla 2.5 Templates &#8211; JFactory::getDocument()"}]},{"@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":null,"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/1587","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=1587"}],"version-history":[{"count":4,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/1587\/revisions"}],"predecessor-version":[{"id":85806,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/1587\/revisions\/85806"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=1587"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=1587"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=1587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}