如何在joomla 3中订购head标签的输出?

时间:2014-07-10 23:08:52

标签: joomla joomla3.0

我在joomla 3中安装了一个插件,在页面的头部添加了og:标签以及其他一些手动放置自己的javascript库和css文件的组件。

由于我无法订购,因此我会随机进行展示位置。

我需要将og标记放在javascript代码上方。

那么如何订购头标签的输出?有可能吗?

例如:

<head>
 <meta name="viewport" content="width=device-width, initial-scale=1">
  <base href="http://websiteurl.com" />
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <meta name="keywords" content="some keywords" />
  <meta name="author" content="Super User" />
  <meta name="description" content="somedescription" />
  <meta name="generator" content="Joomla! - Open Source Content Management" />
  <title>Κεντρική</title>
  <link href="http://websiteurl.com" rel="canonical" />
  <link href="/templates/websiteurl/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
  <link href="http://websiteurl.com/el/component/search/?format=opensearch" rel="search" title="Αναζήτηση fmagreece.com" type="application/opensearchdescription+xml" />
  <link rel="stylesheet" href="http://websiteurl.com/plugins/content/socialsharebuttons/style/style.css" type="text/css" />
  <link rel="stylesheet" href="http://websiteurl.com/plugins/system/shadowbox/shadowbox/examples/build/shadowbox.css" type="text/css" />
  <link rel="stylesheet" href="/media/jui/css/bootstrap.min.css" type="text/css" />
  <link rel="stylesheet" href="/media/jui/css/bootstrap-responsive.min.css" type="text/css" />
  <link rel="stylesheet" href="/media/jui/css/bootstrap-extended.css" type="text/css" />
  <link rel="stylesheet" href="/media/mod_languages/css/template.css" type="text/css" />
  <link rel="stylesheet" href="/modules/mod_ariextmenu/mod_ariextmenu/js/css/menu.min.css" type="text/css" />

  <meta property='og:url' content='http://fmabrotherhood.com/el/'>
  <meta property='og:type' content='article'>
  <meta property='og:title' content='main '>
  <meta property='og:description' content='some description'>
  <meta property='og:image' content='http://websiteurl.com/images/welcomeswstows.jpg'>

<link href="/templates/fmafilipinomartialartstemplate/css/template.css" rel="stylesheet" type="text/css" />
</head>     

并将其更改为

<head>    
  <meta property='og:url' content='http://fmabrotherhood.com/el/'>
  <meta property='og:type' content='article'>
  <meta property='og:title' content='main '>
  <meta property='og:description' content='some description'>
  <meta property='og:image' content='http://websiteurl.com/images/welcomeswstows.jpg'>

  <meta name="viewport" content="width=device-width, initial-scale=1">
  <base href="http://websiteurl.com" />
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <meta name="keywords" content="some keywords" />
  <meta name="author" content="Super User" />
  <meta name="description" content="somedescription" />
  <meta name="generator" content="Joomla! - Open Source Content Management" />
  <title>Κεντρική</title>
  <link href="http://websiteurl.com" rel="canonical" />
  <link href="/templates/websiteurl/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
  <link href="http://websiteurl.com/el/component/search/?format=opensearch" rel="search" title="Αναζήτηση fmagreece.com" type="application/opensearchdescription+xml" />
  <link rel="stylesheet" href="http://websiteurl.com/plugins/content/socialsharebuttons/style/style.css" type="text/css" />
  <link rel="stylesheet" href="http://websiteurl.com/plugins/system/shadowbox/shadowbox/examples/build/shadowbox.css" type="text/css" />
  <link rel="stylesheet" href="/media/jui/css/bootstrap.min.css" type="text/css" />
  <link rel="stylesheet" href="/media/jui/css/bootstrap-responsive.min.css" type="text/css" />
  <link rel="stylesheet" href="/media/jui/css/bootstrap-extended.css" type="text/css" />
  <link rel="stylesheet" href="/media/mod_languages/css/template.css" type="text/css" />
  <link rel="stylesheet" href="/modules/mod_ariextmenu/mod_ariextmenu/js/css/menu.min.css" type="text/css" />

<link href="/templates/fmafilipinomartialartstemplate/css/template.css" rel="stylesheet" type="text/css" />
</head>

1 个答案:

答案 0 :(得分:1)

您很可能需要编辑插件。通常这样的简单插件只是在呈现页面之前搜索并替换html的一部分。

例如,我看了一下...... http://extensions.joomla.org/extensions/site-management/seo-a-metadata/open-graph/17810

这将查找标记</title>并在此之后放置OG内容。你的工作可能会以类似的方式工作。

非常确定Facebook不会介意你放置标签的位置。