跳转到主要内容
你行网

Main navigation

  • 首页
  • 文章
  • 教程
  • 视频
  • 下载
  • 社区
  • 网址导航
User account menu
  • 登录

面包屑

  1. 首页

在 Drupal 中权重(Weight)是怎样排序的

由 hrs, 7 八月, 2025

在 Drupal 中,如果你想让三个链接(Google、Bing、百度)按照特定顺序排列(Google 第二,Bing 第一,百度第三),你可以通过 权重(Weight) 来控制它们的顺序。

权重规则(关键点)
数值越小,排序越靠前(权重 -10 比 0 更靠前,0 比 10 更靠前)

相同权重时,Drupal 可能按创建时间或其他默认规则排序

如何设置权重
情况1:如果是菜单(Menu Links)
进入 结构(Structure) → 菜单(Menus),找到你的菜单(如 Main Menu)。

点击 `列表链接(List Links)。

找到 Google、Bing、百度 三个链接,调整它们的 Weight(权重):

Bing(第一) → 设置 Weight = -1(或更小)

Google(第二) → 设置 Weight = 0(默认)

百度(第三) → 设置 Weight = 1(或更大)

保存,Drupal 会自动按权重排序。

情况2:如果是内容列表(如 Views 或 Taxonomy)
进入 结构(Structure) → 视图(Views) 或 分类(Taxonomy)。

找到你的列表(如 "搜索引擎列表")。

在 排序标准(Sort Criteria) 里添加 Weight 字段,并选择 升序(ASC,从小到大)。

编辑 Google、Bing、百度 的内容,分别设置它们的 Weight 值:

Bing = -1(第一)

Google = 0(第二)

百度 = 1(第三)

保存,列表会按权重排序。

情况3:如果是区块(Blocks)
进入 结构(Structure) → 区块布局(Block Layout)。

找到你的区块(如 "搜索引擎链接")。

在 区域(Region) 设置里调整 Weight:

Bing = -1(最上)

Google = 0(中间)

百度 = 1(最下)

保存,区块会按权重排序。

总结
网站    目标排序    推荐权重
Bing    第一    -1
Google    第二    0
百度    第三    1
这样设置后,Drupal 会按 权重从小到大 排序,最终顺序就是 Bing → Google → 百度。

标签

  • Drupal
  • 登录或注册以发表评论

评论

相关文章

解决 Drupal 主题缺失问题
Drupal Composer命令及作用总结
drupal 中的解耦菜单
drupal .htaccess 文件的配置解释
drupal启用大文件上传解决方案
如何从基于 Drupal 的 CMS URL Linux 门户中删除 index.php
drupal 基本的目录结构
drupal index.php 的工作流程
在 Drupal 8 中从 URL 中删除 index.php
drupal Index.php 的永久解决方法
Drupal 机读名称的命名规范
如何使用Drupal构建网站

文章标签

CSS
Excel
ubuntu
php
五笔
vim
Linux
VPN
command
HTML
drupal 7
centos
composer
Mysql
drupal 8
模块(module)
drush
JavaSrcipt
apache
drupal 9
英语
Drupal
nerdtree
SEO
network
果树种植
surround
drupal10
主题(theme)
phpmyadmin
ssh
二进制
yum
权限
声音
ssl
selinux
HTML5
用户
Dreamweaver
password
flameshot
颜色
翻译
uploadprogress
DDEV
视图(views)
firewalld
kernel
快捷键
gzip
xdebug
错误
WireGuard
ckeditor
电脑基础
邮件验证
简介
mbstring
源地址
C语言
certbot
php扩展
git
apt
httpd
电子秤
压缩解压
表单
breadcrumb
AI
superfish
摄影
短信验证
重定向
diff
网站备份
tagclouds
java
docker
csharp
adsense
电脑技巧
版本号
RSS
simple_adsense
算法
端口
youtube
JavaScript
drupal 11
cookie
badblocks
VUE
计算机基础
网站运营
RFID
gimp
nginx
form
zip
mod_expires 模块
http验证
dns
标签优化
curl
赚钱
ip
重定向,301
netstat
maven
input
字段
npm
哈希值
wps
更多
RSS源
Copyright © 2019 - 2021 你行网 版权所有  粤ICP备19072650号