password
Thepassword
template renders the password page, which is a landing page that's shown whenpassword protection is applied to a store. This page includes a message that is editable by merchants, and the password form for customers to gain access to the store.
Thepassword
template is located in thetemplates
directory of the theme:
你可以包括下列哟ur password template or a section inside of the template:
The password message
Anchor link to section titled "The password message"启用密码保护时,在一个商店,there's also the option to include a message. This message can be shown using thepassword_message
attribute of the Liquidshop
object:
The password form
Anchor link to section titled "The password form"The password form can be added with the Liquidform
tagand accompanying'storefront_password'
parameter. Within the form tag block, you need to include anwith the following attributes:
type="password"
name="password"
For example:
The email sign-up form
Anchor link to section titled "The email sign-up form"You can include an email sign-up form, to capture customer emails, with the Liquidform
tagand accompanying'customer'
parameter. Within the form tag block, you need to include the following:
Input | type |
name |
value |
---|---|---|---|
Tags | hidden |
contact[tags] |
prospect, password page |
email |
联系(邮件) |
- |
For example:
If you're working on adevelopment store, then you can't show a custom password page on the store. A development store-specific password page is always displayed.
Although the customizable password page isn't used to control access to your development store, you can still view it after you log in, or edit it from the Shopify admin.
To view the customizable password page, logged-in visitors can navigate tohttps://your-store-name.myshopify.com/password
, whereyour-store-name
is the name of the development store.