I need to create webpart in sharepoint 2010 which will allow me to view page from specific URL.
I.E. I'd like to view http://google.com from this webpart. What's the simpliest way to accomplish that ? I'm totally novice to Sharepoint developement, I've just downloaded SDK and watched some screencasts about creating webparts. Also I'd like to have few of this webparts on one page.
Maybe there is another and better way than creating a webpart ?
The easiest way is to use the Page Viewer Webpart. It embeds an IFRAME in the page, actually.
Maybe there is another and better way than showing external pages in an IFrame. Usually something like this will do:
This is not actually google, and eventhough we would love to actually be google
this link will have to do for now
Or if you are serious about displaying data from external partners, you should consider retrieving data through web-services.
Related
I have googled this with a couple of differing terms and I could not find my solution. What I want to do is to manipulate a webpage by editing its source, for example removing a part from the code maybe a div or so. I know how to get the source of a webpage and know how to change the code but I have no idea how to manipulate the page instantly, by for example removing an element.
Your help would be appreciated!
If you want to manipulate client code (HTML) what you need is Ajax.
You can use JQuery javascript library to manipulate html of a page adding, editing and removing html tags, scripts, etc.
Here you can find a decent tutorial as a start point.
If you want to manipulate server code (C# codebehind) what you need is creating a web project in visual studio (ASP.NET Web Application)
EDIT: As commented by #CSharpened both solutions are not mutual exclusive. You can have an ASP.NET Web application that uses Ajax to manipulate UI. In fact lot of people does that.
I would consider using AJAX. You can use either javascript or jquery coupled with html, asp.net and C# to achieve the results you are after.
For simple editing like removing divs or collapsing menus etc simple Javascript or jquery will suffice. However changing the coding of the page requires you to use AJAX or similar.
I'm going to develop a website which uses ajax to load pages. The cms behind it, is going to be Sitefinity. The problem is I don't know if it's possible to load the pages of sitefinity with jQuery.Load() or any other ajax technique.
Problems with sitefinity:
- I'm able to get the page object of sitefinity, but i need the rendered HTML.
- I'm going to make the pages in the CMS and each page will have a html, header, body tag etc. And I just need the main content of the page, so i'll have to strip the html aswell!
I've been searching alot, but haven't encountered a solution. If someone could give me tips where to search, or how to do it, I'll appreciate it alot!
A more efficient way to pull the pages in would be to connect to the Sitefinity WCF service with jQuery. You will receive JSON page data via AJAX that you can use to compose your page.
Your project's /Sitefinity/services/ folder is filled with .svc service files that you can query to get various items such as pages (/Sitefinity/services/pages/PagesService.svc/), images, blog posts, etc.
The documentation for using those services from jQuery is a little sparse at this point, but they are actively being improved.
See: Sitefinity Documentation Calling Sitefinity RESTful WCF services from Client Side
And this is a good example (non specific to Sitefinity) on how to call WCF services from jQuery.
One note: Sitefinity is very modular and serves pages and content items separately, you may need to query for a page first to find out what content items need to be queried.
Ask on the SiteFinity support forums. The devs are pretty good about answering questions on there.
Yes, it's possible to retrieve content from Sitefinity via .load(). You can use only a portion of the returned document by doing something like the example below.
$('#empty-container').load('sitefinity-page #main-content');
I'm working at a small company within a rather large company, where I don't really have control over our intranet. I have built a little site/page, and I want it to style exactly like the intranet pages.
I know I can download the stylesheets and start hacking away, but I need the links and the menu's to be up to date.
I'm working with asp.net mvc 2 here, but I've no idea how to go further from here. Thoughts?
You will need to copy the CSS etc.
About the menu - you will need to do the fallowing
use WebRequest for getting the new data, Use Html Agility Pack for parsing the page, And use XPath for getting the relevant data - I will recommend using caching for this
Standard sharePoint just put "Page - some site" in the page title in the browsers, but I want to change that, but don't know how.
I have succesfully created a webpart to do so, but I believe it's a major overkill creating a webpart to control such a small part of something as huge as SharePoint.
So how can I control what the page title in best practice?
Is a webpart reallly neccessary or can this goal be achieved in some other way?
To specify some more: I don't want it to just have the same title all over the site. I want it to say something like: "AwesomeSite - Home" or "AwesomeSite - Video upload" etc. You get the point.
First question , where would these keywords like AwesomeSite, Home, Video Upload come from ? What would be the source?
The best would be to create a Delegate Control and refer it in your master page. This delegate control can be either a simple javascript to set the Title or a web server control which will query the sharepoint metadata on current page to set the Title.
I have an web based application. The content for the Home page has been currently mentioned in the HTML code for the Home page using , and tags. To change the content anytime in future, it needs to be changed in the HTML code. :(
Is there a way that we can pick up the content from some external place and get it reflected through the website. This ways, any change if required can be made at the external location without referring to the application's code.
Please advise if there is any solution for it.
Thanks.
You can
Use a database
Include external files using Server Side Includes
Read external files and write their contents and an alternative method
Sounds like you're looking for a Content Management System (CMS), which will allow your content editors access to modify only specific blocks of a page that you specify.
There are a ton out there to do what you want, so you don't have to start from scratch. Just Google 'CMS'.
Although I haven't used it myself, DotNetNuke is a popular one these days and has a free version.