类别 描述(数量) 计算
我为一家餐厅安装了 WordPress,其中包含带有数字的菜单(食物)。
菜单(食物)编号不是从 1-50 连续,而是从接下来的 5 个开始,如下所示:
午餐优惠:1-4
鸡棒:10-13
鸡翅:15-17个
沙拉:20-23
这是制作的,因此很容易在不同类别中添加一些东西,而无需以下菜单必须更改数字。
然而,这很难(至少对我来说)。
我的解决方案是在描述中为每个类别指定一个编号,然后将这个编号添加到该类别的子编号中。
前任。: 午餐优惠(类别描述= 1)
- (menuNumber = 类别描述 + ChildNo) 汉堡 (childNo = 1)
- (menuNumber = 类别描述 + ChildNo) 鸡 (childNo = 2)
- (menuNumber = CategoryDesc + ChildNo) 沙拉 (childNo = 3)
这有意义吗?如果是这样,我该如何实现这一目标?
先感谢您...
I have a Wordpress installation for a restaurant, with a menu (food) with numbers.
The menu (food) numbers dosn't go from 1-50 continuously but starts with the next 5 like this:
Lunch offers: 1-4
Chicken sticks: 10-13
Chicken wings: 15-17
Salads: 20-23
This is made, so it's easy to add something within the different categories without the following menues would have to change the number.
However, this is very hard (for me at least) to make.
My solution is to give every category a number, in the description, and then add this number to the childs number of the category.
Ex.:
Lunch offers (categoryDesc. = 1)
- (menuNumber = categoryDesc + ChildNo) Burger (childNo = 1)
- (menuNumber = categoryDesc + ChildNo) Chicken (childNo = 2)
- (menuNumber = categoryDesc + ChildNo) Salad (childNo = 3)
Does it make sense? If so, how do I achieve this?
Thank you in advance...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决方案是使用有序列表 (OL) 制作列表,然后以您想要的数字开始 OL。
我就是这样做的。
The solution is to make the list with ordered lists (OL) and then start the OL's with the number you want to.
That's the way I did it.