表达式引擎:处理用户数据,定义成员字段或绑定到通道的最佳方法?(expression engine: best way to handle user data, defined member fiel

编程入门 行业动态 更新时间:2024-10-23 04:50:56
表达式引擎:处理用户数据,定义成员字段或绑定到通道的最佳方法?(expression engine: best way to handle user data, defined member fields or tie to a channel?)

在表达式引擎中:

我有一个网站,企业可以注册,然后出售1种类型的小部件。 每个企业只需要名称,小部件和价格。 然后会有一个页面显示所有业务,其小部件和价格。

处理额外参数'小部件'和'价格'的最佳方法是什么?

根据我的工作,有两种选择

1 /以没有管理员权限的组中的用户身份注册业务。 为用户添加两个自定义成员字段“小部件”和“价格”。 (它可能不被称为'成员'字段,我会忘记我的记忆)。 为了展示这些业务,我抓住用户。

要么

2 /以没有管理员权限的组中的用户身份注册业务。 添加一个名为“id”的自定义成员字段。 然后创建一个“商家”频道,并向该频道添加自定义字段“名称”,“窗口小部件”,“价格”,“user_id”。 然后将业务渠道的实例链接到具有“id”属性的用户。 当我想展示这些业务时,我会从频道中获取详细信息。

对不起,如果已经在某处已经回答了。 我没有从谷歌那里获得太多运气,很可能是因为我无法简洁地表达我的问题。

谢谢

戴夫

In expression engine:

I have a site that businesses can sign up and then sell 1 type of widget. Each business just needs name, widget and price. Then there will be a page that shows all business, with their widget and price.

What is the best way to handle the extra parameters 'widget' and 'price'?

From what I can work out there are two options

1/ Sign up the business as a user in a group with no admin privilages. Add the two custom member fields 'widget' and 'price' for the users. (It may not be called 'member' field, I'm going off my memory). To show these business I then grab the users.

or

2/ Sign up the business as a user in a group with no admin privilages. Add a one custom member field called 'id'. Then create a 'business' channel and to that channel add the custom fields 'name', 'widget', 'price', 'user_id'. Then link the instance of the business channel to the user with the 'id' property. When I want to show these business I grab the details from the channel.

Sorry if this is already answered somewhere. I'm not getting much luck from google, most likely because i'm having trouble phrasing my question succinctly enough.

Thanks

Dave

最满意答案

戴夫,

如果您已经决定使用用户来组织这些业务,那么您最好的选择就是两个自定义字段。 它们更容易在模板中使用,您不必担心在自定义成员字段“id”中提取项目的频道数据。 话虽如此,您应该查看Solspace的用户模块 - 这将为您提供更多的会员信息灵活性。

另一个想法,取决于这些企业是否应该能够编辑他们的小部件和价格,你可以将它作为一个频道并完全跳过使用用户。 使用Freeform,您可以创建一个表单,企业可以在其中添加该信息,收到电子邮件,然后将信息添加到所需的频道。

韦斯

Dave,

If you're dead set on using users to organize these businesses, then your best bet would be the two custom fields. They're easier to use in templates and you don't have to worry about pulling in the channel data for the item in the custom member field 'id'. That being said, you should check out Solspace's User Module—it'll give you more flexibility with the member information.

Another thought, and depending on whether or not these businesses should be able to edit their widget and price, is you could just make it a channel and skip using users altogether. Using Freeform, you could create a form where businesses add that information, you get an email, and you add the information to the channel you want.

Wes

更多推荐

本文发布于:2023-07-17 07:44:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1141153.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:表达式   字段   绑定   通道   定义

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!