我想要一种情况,如果我提供链接到页面并且查看者单击它,则该页面上隐藏了单个元素(面包屑),但如果该人自己导航到该页面,则会显示相同的元素(面包屑) 。
是否有快速而肮脏的方法来实现这一目标?
I want a situation where if I supply a link to a page and a viewer clicks it, a single element (breadcrumbs) is hidden on that page, but if that person navigates to the page on their own that same element (breadcrumbs) is displayed.
Is there a fast and dirty way to accomplish this?
最满意答案
是,
在链接中提供了一个查询参数,例如:&clickedFromLink = true
然后使用您使用的任何语言或javascript,检查页面上的URL中是否存在此属性,您具有痕迹并相应地进行更改。
当有人输入URL时,他们将没有URL参数。
干杯
Yes,
In the link provide a query paramater something like: &clickedFromLink=true
Then using whatever language you use or javascript, check if this property exists in the URL on the page you have breadcrumb and make changes accordingly.
When someone just typed in the URL, they will not have the URL parameter.
Cheers
更多推荐
发布评论