Such code appears in site home page:
if (($data['maintenance']==0)) {
Can't understand why it's happening...Screenshoot has been attached for reference.
Code show in homepage
Related
How can I make www.domain.com/mobile.html show up as m.domain.com in the browser bar?
My standard index.html file is in the root directory, so its adress is www.domain.com/index.html.
It uses javascript to redirect users to a mobile website at www.domain.com/mobile.html.
I just want it to show up differently in the adress bar, not change the actual location of the mobile.html file.
I could not get this to work properly with an .htaccess file on my web server. Instead I used the folowing workaround instead:
the html index file at www.domain.com redirects mobile users to m.domain.com on detection of a screen.width <= 1024px.
<script type="text/javascript">
if (screen.width <= 1024) {
document.location = "http://m.spotlightfoto.nl";
}
</script>
Only the mobile version of the index is located at m.domain.com and is linked to all it's resources at the www.domain.com by adding a <base href> at the very top of the <head>
<base href="http://www.domain.com">
I'm posting this for future reference.
Maybe it's not the most efficient or lean way of doing this, but it does give the desired results. The downside would be the added request by first going to the regular index.html before redirecting the mobile user to the mobile domain.
We have a main public site, abcd.com, which is using SharePoint Office 365 and another replica SharePoint site using this format - abcd-public.sharepoint.com.
For some reason,
<link rel="canonical" href="http://abcd-public.sharepoint.com:80/Pages/Home.aspx" />
shows up on every page our main public website (abcd.com). The path above changes depending on the page the user is on.
If I understand this correctly, this could be one of the reason why our site does not show up on google search result at all. If possible, we would like to reverse the behavior so the SharePoint version of the site has the canonical url = abcd.com.
or
Is there a way to completely remove the canonical url from the main website (abcd.com)? Or is there some sort of a setting that could help our site to show on google search result?
I had the same problem and the only solution that I found is create a webpart to put in the masterpage and in the prerender event of the webpart put this lines of code:
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
HttpContext.Current.Items["CanonicalURLWithParameters"] = "http://example.com/customurl";
}
Sergio
I have a liferay service with many sites. Those sites has the same theme but each has different color scheme. How to set a theme to a /html/portal/status.jsp ( error page) of the current site ? I don't want to create an error page for each site and I don't want all the sites to have the same error page.
One way is override this JSP (using hook / ext) and create themeCSSPath using themeDisplay, as following:
themeCSSPath is the path of the main.css of the theme applied on current page.
CSS path
String themeCSSPath = themeDisplay.getPortalURL() +
themeDisplay.getPathThemeCss() + "/main.css";
CSS link
<link rel="stylesheet" type="text/css" href="<%=themeCSSPath %>" />
I don't want to create an error page for each site and I don't want
all the sites to have the same error page."
This doesn't make sense.
"/html/portal/status.jsp" is an external JSP page, not part of Portal/Site pages. So, Liferay theme plugin won't work here. You have to design the JSP pages similar to you have on Portal/Site pages.
We have a corporate website which has an iFrame within a page pointing to my XPage.
The problem I have is that the same XPage is also used in another iFrame (different page) and I need to clear some Scope variables on beforePageLoad event.
Using SSJS; how can I get the parent window url for my iFrame content?
Example:
Corporate page #1 = http://mycompany.com/training-courses
Corporate page #2 = http://mywebsite.com/training-ilo
Both pages have an iFrame pointing to http://dominoserver/myapp.nsf/xHome.xps
Unless your domino server domain is the same as the parent sites, you will not be able to access information from those pages.
Your best bet is to supply a url parameter to the src of the iframe:
<iframe src="http://dominoserver/myapp.nsf/xHome.xsp?site=xyz"></iframe>
Then, in your ssjs of your xpage you can grab the url information using the XSPUrl class:
var url : XSPUrl;
url = context.getUrl();
var site = url.getParameterName("site");
I am working on JSF. I have a requirement like this. When I click a link it should open the target in a new tab. But the target page does not reside inside my project. It is a seperate application.
I tried a href, h:link nothing is working.
This is what i tried finally. But its again and again opens the same page in new tab.
<h:commandLink value="#{item.title}" target="http://localhost:89/kordil_edms/documents.php" />
try this -
Open