【发布时间】:2014-07-10 23:08:52
【问题描述】:
我在 joomla 3 中安装了一个插件,它在页面头部添加了 og: 标签,以及一些手动放置自己的 javascript 库和 css 文件的其他组件。
位置对我来说是随机发生的,因为我无法订购它们。
我需要将 og 标记放在 javascript 代码上方。
那么我如何对 head 标签的输出进行排序呢?有可能吗?
例如:
<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>
【问题讨论】: