I have a sharepoint 2013 site with a page that uses the CSWP and a custom display template. When there are no results, I want to display a message that says "Share What's Going On". I tried setting the $noResults variable in the display template, but nothing displays. When I set a breakpoint on that same line, the browser doesn't break.
How do I display a "no results" message?
Thanks
Jim
You'll need to set the EmptyMessage web part property value. The property is hidden so you'll have to set it programmatically or by exporting the web part and editing the .webpart file.
Think this link have your answer:
Link for changing $noResults
Related
I have developed display template and using it in Content search web part.
For displaying result on page i am using JQuery datatable/JQuery Tabs in display template.
Everything works fine, but sometime while loading page i am getting error like ("Object doesn't support property or method 'dataTable' (OnPostRender: )" and for tabs error is "Object doesn't support property or method 'tabs' (OnPostRender: )").
And if i refresh page many times then error will go and result is display as code.
I have register JQuery, JS and CSS using $includeScript.
I have also tried with RegisterSod for JQuery and JS file but still issue is same.
Thanks in Advance.
Can be:
This error usually occurs when an html element id has the same id as some variable in the javascript function, try change the name.
If you put the code I'll be able to help you better.
test = button.attr('test'); // Object doesnt support this method
$test= button.attr('test'); // works fine
Or debbug your code with and discover your problem. Enable script debugging IE:
In Internet Explorer, choose Internet Options from the Tools menu.
In the Internet Options dialog box, click the Advanced tab.
On the Advanced tab, under Browsing, clear Disable Script Debugging.
Click OK.
If you have IE 8+ click here
Tutorial Using jQuery dataTables: link here
Sometimes my "mailto:" function works inside a browser (more specifically Google Sheets), sometimes it doesn't. In Google Sheets I have a spreadsheet where, when I click on the cell, it pulls up the following if statement which contains a mailto: instruction so that a form email is created in a mail client, like Outlook:
=IF(Q2>0,HYPERLINK("mailto:"&Q2&"?CC=sales#clickitco.com&Subject="&Letter!A$2&"&body="&Letter!$B$2&" "&$AE2&",%0A%0A"&Letter!$C$2&"%0A%0A"&Letter!$D$2&" "&$B2&"%0A%0A"&Letter!$E$2&"%0A%0A "&Letter!$F$2&"%0A%0A "&Letter!$G$2&"%0A%0A "&Letter!$H$2&"%0A%0A "&Letter!$I$2&"%0A%0A "&Letter!$J$2& "%0A%0ASincerely,","email"),"")
The cells it refers to are paragraphs of the email.
Sometimes this works, sometimes it doesn't. I have looked at the browser's pop-up blockers, the restrictions on any Java, etc. Nothing seems to prevent this from creating an email. I have tried it in Chrome and Explorer, the current versions of each. I have tired it on several versions of Windows, from 7 to 10. Same results.
I think you should try it on a simple web page first. Perhaps, the google sheet cell has prevent the link default action, or the google sheet has prevent some client event bound to cell. You can also try other event bind method, such as modify the html source in debug mode, add the "mailto:" to a link directly.
maybe you can help me.
I use verison 6.1.1 ce of liferay.
I have installed the "default-web-content-hook" from plugin-repo.
I want to set a default template for the webcontent display portlet, so that when a user clicks "Add Web Content" and the editor opens up, a certain preconfigured template, like "carousel" from the default-web-content-hook.
Anyone found out how it works?
Thanks guys, you're the best!
Have a nice weekend!
I think that there is no such option in Liferay which would set the default structure (template).
But it could be achieved in several ways.
You could just edit the link which opens the add web content dialog and append the structureId param with appropriate value.(&_15_structureId=MULTIPLE-ITEM-CAROUSEL)
Other option would be modify /portal-web/docroot/html/portlet/journal/edit_article.jsp and when the structureId param is null insert there a value. This value could be hard coded or supplied via configuration.
Also you could modify com.liferay.portlet.journal.action.EditArticleAction.
I'm been working with Sitecore for a while, but this is my first time on the page editor.
So, I go to my sublayout and I place a sitecore tag instead a .net tag
<sc:Text ID="txtContent" Field="Content" runat="server"/>
Content is the normal content field on the sitecore page.
When I go to the page editor, I'm able to see the correct content and do some editing but the save button is disabled and my changes are not saved at all
I'm I missing something very basic here?
this is a screen cast on what I'm doing
http://screencast.com/t/0itqgjGVQx8
Update: After including jquery.noconflict constructs, the execution moves to the handler function in the ribbon correctly. BUT it seems that the button itself is disabled. Is it possible to enable/disable the button? is it disable on specific situations? if so how can I enable it.
There might be invalid html appearing. Check you hints for buttons, etc. There might be non-escaped texts on the page.
I've resolve this some time ago... in the sublayout definition on sitecore there was a redundant/wrong compatible rendering definition. Once I removed that, the save button appeared and the sublayout started to work as expected
A week ago, the "Like Button" in a page I'm developping stopped working, whether I use XFBML or social plugins, I get the same result.
When some one tries to click the Like Button, the get an error message, and the link says "This page is either disabled or not visible to the current user."
What couldit be?
Had the same issue recently. If you used the like button generator, this is what solved it for me: you have to have the exact same settings in your iframe and open graph data as you did when you first generated the like button. Not sure why, but this was the only way to get mine to work. I had changed to a different layout and size. Of course, the facebook linter is definitely helpful as well:
http://developers.facebook.com/tools/debug
Put the url into the URL Linter and that should clear the cache. If it is still an issue, perhaps your link got blocked for spam. What is the url?