I have a requirement where in a page is to be duplicated. This page has several image appearing with effects. It has images path stored in xml file & effects in flash files. I am using web content display, when i include just the plain swf files output is blank . I have included other .swf files in flash link they are working fine.But this .swf files need images so its blank. I have tried making a portlet, passing images in array and then giving transitions through javascript but the same effect is not achieved more over when i include portlet in my website my theme & other WCD is disturbed so i have dropped portlet way. But other than this how can the image be passed to WCD on a flash link.Please help as how the image & flash to be embeded in web content display.
My Actual page has xml :
<?xml version="1.0" encoding="utf-8" ?>
<slides>
<slide imageUrl="/images/home/A_397x930px.jpg" />
<slide imageUrl="/images/home/B_397x930px.jpg" />
<slide imageUrl="/images/home/C_397x930px.jpg" />
<slide imageUrl="/images/home/D_397x930px.jpg" />
</slides>
My flash code :
<script language="javascript" type="text/javascript">
var so = new SWFObject("/andiosp-flash.swf", "mymovie", "930", "398", "8", "#ffffff");
so.addParam("quality", "high");
so.addParam("wmode", "transparent");
so.addParam("allowFullScreen", "true");
so.addParam("salign", "t");
so.write("flashcontent");
</script>
I am using Liferay 6.1
If you store your images in a theme, e.g. "your-theme", then you should try to access them by URLs:
/your-theme/images/home/an-image.jpg
This is the same for the other Liferay plugins.
The second way is to upload images while creating "Web Content Display" portlet:
Click "Image" button on the WYSIWYG toolbar
In tab "Image Info" click "Browse Server"
Then you'll be able to choose an existing image or upload new image in the repository
After you choose an image, you'll see the URL for this image in the field "URL"
You may also consider to upload images in "Documents and Media" portlet. Choose "Control Panel" -> "Documents and Media" and add your image as "Basic Document". Then you'll be able to click on uploaded image and get its URL provided by Liferay Portal.
Related
I have created a main site and I have created many subsite under the main site.
When I am in any main page and click on the logo icon, the page redirects to the home page.
But, when I am in any subsite and click on the logo icon, the page redirects to the subsite homepage rather than the main hompage.
I would like to change the navigation URL to the root site. Let me know if I have to edit any masterpage, or is there any common page that will inherit to all the child application.
Thanks
We have 2 ways to do this.
Method 1:
From the Snippet Gallery, copy and paste the default SiteLogo code snippet into your master page into the appropriate place you want it to be displayed.
In the SiteLogo code, search for SharePoint:SPSimpleSiteLink to find the relevant opening and closing tags. Now simply change the tag names to SharePoint:SPLinkButton instead.
Then simply add the attribute NavigateUrl to this tag and set it’s value to “~sitecollection/”.
Example:
Default snippet code:
<!--MS:<SharePoint:SPSimpleSiteLink runat="server" CssClass="ms-siteicon-a" ID="x7917ecc8c38d4bd69f58e338eab54c8c">-->
...
<!--ME:</SharePoint:SPSimpleSiteLink>-->
Should become this:
<!--MS:<SharePoint:SPLinkButton runat="server" NavigateUrl="~sitecollection/" CssClass="ms-siteicon-a" ID="x7917ecc8c38d4bd69f58e338eab54c8c">-->
...
<!--ME:</SharePoint:SPLinkButton>-->
Ref link
Method 2:
We are going to add custom js in the master page => our site is a publishing site
We find the site logo in the below hierarchy(in a rendered page).
<div id='DeltaSiteLogo'>
<a href='site url'>
<img src='siteIconPath.png/whatever extension'/>
</a>
</div>
So we may try the following for redirecting to the site collection/root web url on click of the logo.
// Add the following js in the '.html' design file that associates with the corresponding masterpage.
<script type="text/javascript">//<![CDATA[
$(document).ready(function(){
$("div#DeltaSiteLogo a").attr("href",_spPageContextInfo.siteAbsoluteUrl);
});
//]]>
</script>
It works.
Edit on the SharePoint Designer Master Pages > seattle.master .
Crtl F - Search for DeltaSiteLogo
DEFAULT:
<SharePoint:SPSimpleSiteLink CssClass="ms-siteicon-a" runat="server" id="onetidProjectPropertyTitleGraphic" >
<SharePoint:SiteLogoImage CssClass="ms-siteicon-img" name="onetidHeadbnnr0" id="onetidHeadbnnr2" LogoImageUrl="/_layouts/15/images/siteIcon.png?rev=47" runat="server"/>
</SharePoint:SPSimpleSiteLink>
Change To This (copy & paste the script):
<SharePoint:SPLinkButton runat="server" NavigateUrl="~sitecollection/" CssClass="ms-siteicon-a" ID="x7917ecc8c38d4bd69f58e338eab54c8c">
<SharePoint:SiteLogoImage CssClass="ms-siteicon-img" name="onetidHeadbnnr0" id="onetidHeadbnnr2" LogoImageUrl="/_layouts/15/images/siteIcon.png?rev=47" runat="server"/>
</SharePoint:SPLinkButton>
Im doing a document searching system, that shows a list of pdf like response, I´m working with primefaces 5
this is my code
<h:outputLink value="file/#{document.pdfPath}" target="_blank" >view document</h:outputLink>
<div id="pdf2">
<object data='file/#{document.pdfPath}'
type='application/pdf'
width='700px'
height='400px'>
<p>It appears your Web browser is not configured to display PDF files.
No worries, just <a href='file/#{document.pdfPath}'>click here to download the PDF file.</a></p>
</object>
<div id="pdf">
<object data="http://www.gnu.org/software/hello/manual/hello.pdf" type="application/pdf" width="450" height="375"></object>
</div>
But this is the problem in eclipse and IE browser runs perfect,but in chorme and mozilla only show the pdf that doesn´t come from a managed bean.
it is what I´m watching
With chrome
With mozilla
and finally Internet explorer (works perfect here)
Here, from your response headers:
Content-Disposition: attachment; filename="contratotest.pdf"
Your /file servlet is serving the PDF as an attachment. This is intented for the "Save As" dialogue thing. If you intend to display the content inline in the web page instead of as an attachment of the web page, then you need to set it to inline.
response.setHeader("Content-Disposition", "inline");
Or just remove it entirely. It's the default already. You may only need to add an extra parameter to the fallback link to force attachment anyway when clicked.
By using the following code in header, I have managed for the rss button in url bar in browser to successful find my feed.
<link rel="alternate" type="application/rss+xml" title="Blog Title" href="http://www.weeblysite.com/1/feed" />
However, the subtome button on browser fails to locate feed. Therefore Feedly, Digg Reader, etc, finds no feed.
How can I implement code in my Weebly generated site to allow all such browser buttons to pick up and subscribe to feed?
Thank you.
Nicholas Boyd Crutchley
http://www.nicholasboydcrutchley.com/infin-story
this is a new blog.. no post...but the old blog has same problem..
The problem comes from the fact that your page has a broken discovery mechanism.
Right now in the <head> section of your HTML page, I can see this:
<link rel='alternate' type='application/rss+xml' title='RSS 2.0' href='http:////feed' />
And clearly, http:////feed is not the right feed url :) You want to have this:
<link rel='alternate' type='application/rss+xml' title='RSS 2.0' href='http://www.nicholasboydcrutchley.com/1/feed' />
And everything should be smooth!
I have now managed to create an upload in jsf that allows the user to upload a txt file, I can also display what has been uploaded, what I need to know now is how can I print this text to a printer when a user presses a command button
Thanks
I have added create a new css file called print.css,
#media print {
#header, #footer, #menu, #title, #h1, #2, #main, #logo, #logo_text, #logo_colour, #site_content, #content{
display: none;
}
}
As these are the things I wish removed
My css for the whole document is:
<link rel="stylesheet" type="text/css" href="style.css" title="style" />
I have added:
<h:outputStylesheet type="text/css" name="print.css" media="print" />
above my button :
<button onclick="window.print()">Print</button>
but when I press this button I can still see all the css
You can at most show up the browser's print dialog by JS window.print().
<button onclick="window.print()">Print</button>
This will still require confirmation of the enduser. It's for websites (fortunately) simply not possible to unaskingly print something. That would otherwise produce a lot of paper waste and annoyed clients.
You might perhaps want to supply a print media CSS along so that only the desired content is been printed and that the remnant is been hidden by display:none. You can find some hints in this related question: Conditionally render JSF components for printing.
How can I fix my new tabs and new windows so that they will display the icon of my site? Currently they display the bluehost default icon.
My normal page icon:
<link rel="icon" href="protectedImages/faviconS.gif" type="image/gif" sizes="16x16" />
My displayed images' target=_blank link:
<td style="text-align:center;"><img src="'.$num.'" width ="'.($width/4).'" alt="random image">
Put a favicon.ico graphic file in the document root of your webserver. For BlueHost, put it in your public_html folder.
To create a facivon.ico file, you can search Google for "favicon generator". and go to a site like http://www.favicon.cc/ to generate it.