因此,我在我的网站(使用umbraco)上实施了一个受保护区域,当您想要访问普通用户无法访问的页面时,该区域会有一个登录。我正在使用umbraco提供的Login Snippet和Login Status Snippet Macro。
像这样:
`<Error> [Firebase/Crash][I-CRA100001] Failed to transmit crash: Error Domain=com.google.FirebaseCrash Code=1 "Upload failed" UserInfo={NSLocalizedDescription=Upload failed, NSLocalizedFailureReason=HTTP Error Code 400: <NSHTTPURLResponse: 0x174039920> { URL: https://mobilecrashreporting.googleapis.com/v1/crashes:batchCreate?key=AIzaSyB8TUDtvxRxo5Kx3nEtIRKYlXDG%5Fj%2DRXmY&alt=json } { status code: 400, headers {
"Cache-Control" = private;
"Content-Encoding" = gzip;
"Content-Length" = 157;
"Content-Type" = "application/json; charset=UTF-8";
Date = "Thu, 01 Jun 2017 08:49:40 GMT";
Server = ESF;
Vary = "Origin, X-Origin, Referer";
"alt-svc" = "quic=\":443\"; ma=2592000; v=\"38,37,36,35\"";
"x-content-type-options" = nosniff;
"x-frame-options" = SAMEORIGIN;
"x-xss-protection" = "1; mode=block";
} }}`
我在页脚上显示它但是现在它始终可见但我只希望当你在受保护的页面上时它可见。
有什么办法吗?
提前谢谢!
答案 0 :(得分:1)
我只是验证他是否登录。使用Umbraco Macro Snippet很容易找到。
@if (Umbraco.MemberIsLoggedOn())
{
<div class="row">
<div class="col-xs-12">
@Umbraco.RenderMacro("MembersLoginStatus")
</div>
</div>
}