I need help.
How do I programatically create a list of external links where you can choose if you want to open the link in a new window or not?
If i have understood what you are asking then I did something similar for SP2003:
Add a column to the Link list called 'New Window' of type 'Yes/No'
Using FrontPage (it was a while ago) I modifed the XSLT for the view (it was the only view and accessed via a listview webpart on the homepage): if New Window = Yes then render the link with target="_blank"
I think the theory for SP2010 should be the same.
Or you could just let the users decide.
Related
Tools: SharePoint 2013, SharePoint 2013 Designer, StratusForms
What I was doing: StratusForms - Modify SharePoint's Default Forms with HTML Templates (https://www.youtube.com/watch?v=oai-m_KyzMc)
Status: DispForm and EditForm currently work, NewForm did work until the incident.
Incident: I deleted the main webpart on NewForm and the form was hosed, so I deleted NewForm.aspx. I recreated the NewForm.aspx and also added it to forms library (https://sharepoint.stackexchange.com/questions/108467/accidentally-deleted-default-editform-aspx). Like before when it worked, I added a Content Editor webpart and pointed it to my StratusForms template, but it did not work . The controls/boxes did not show up. It worked before on the old NewForm, and it currently works on DispForm & EditForm.
Question: Given the above information does anyone know why, or better yet have a solution, to get NewForm.aspx working with StratusForms again?
Thank You!
So the underlying issue was SharePoints internal linkage of it's 3 forms (DispForm, EditForm, NewForm) to the data sources.
So those out-of-the-box forms are not like the ones we create. Even though you create a new "NewForm" and it may look like the old default NewForm, but it is not. There is metadata like Microsoft.SharePoint.PAGETYPE, which tells if it is a custom form or new, display, or edit form.
The resolution was found in this article (http://www.sharepointblogs.be/blogs/vandest/archive/2011/03/11/troubleshooting-issues-with-dispform-editform-and-newform.aspx).
In case the link breaks I have also included the manual method here:
Manually
It's easiest if you take a corresponding form from another SharePoint List in the site and export it (SharePoint Designer) or just copy it to a text editor. This way, most of the settings of the List Form Web Part are already correct
Generate a new GUID and fill that in for the __WebPartId [uppercase & just change a few chars/numbers] and properties [lowercase, same as WebPartID & has a g_ prefix] of the List Form Web Part markup. It has to be the same GUID but the formatting is different. See the above screens for samples
Update the property with the List ID you're targeting
Verify all other properties of the List Form Web Part and save the file as either DispForm.aspx, EditForm.aspx or NewForm.aspx
Import (SharePoint Designer) the page (or paste contents from the text editor)
So I have a layout view within Sitecore Mvc, this view contained a Controller Rendering that pulls in a header and footer navigation. Example:
#Html.Sitecore().Rendering("/sitecore/layout/renderings/some_rendering")
This specifies a Controller Rendering I've defined in Sitecore. This works great, except when I'm in the experience editor. It doesn't give me the ability to select this rendering. If I create a Placeholder and then define these navigation elements to this placeholder dynamically via Sitecore, then I can, but these navigational elements exist on every page of this layout, so I would like them statically placed instead of using a Placeholder, but I would still like the user to be able to select the navigation element in the experience editor (so I can create custom command to interact with this navigation, such as creating new links, etc).
Does anyone have an idea that will help me achieve this?
Use Edit Frame for that and create Custom Edit Frame Button for operations like adding new element to the navigation.
And remember to pass Datarsource ID or Path as a second parameter to the Html.Sitecore().Rendering() method:
#Html.Sitecore().Rendering("/sitecore/layout/renderings/some_rendering", new { DataSource = "{some-id-or-path}" })
Here is set of blog posts which can help you to understand how Edit Frames work and how to add them in Sitecore MVC solution:
https://visionsincode.wordpress.com/2015/01/08/how-to-use-editframe-in-sitecore-mvc/
https://www.cmsbestpractices.com/how-to-properly-use-sitecore-edit-frames/
https://briancaos.wordpress.com/2011/11/28/using-sitecore-editframe-in-pageedit/
You won't be able to remove the component or move it around the page (yeah, it's statically bound to one place on your layout), but you will be able to edit it's properties and datasource.
You can try to use GlassMapper views and statically inherit the view from the GlassView.
Then you'll be able to use Editable method to render the field.
But the consideration you need to take is that you'll not be able to set a datasource to the component from the page editor or content editor.
Instead of injecting the rendering through the Rendering method you should be able to use standart MVC RenderPartial.
I've used this approach on one of the projects I've been on and it worked.
I'm using sharepoint 2013 and i want to utilize the client side rendering feature using JSLink, when editing the web part for the calendar new event, in the "miscellaneous" there is no field for JSLink, how to modify the render for new event using JSLink ?.
It is not possible. See this discussion.
After about an hour's worth of research I found the problem. Microsoft specifically targets the Invalid, Event, and Survey list types to ignore client rendering. Unless you create your own webpart you will not ever be able to use any of the JSLink properties for these list types. Maybe somebody at Microsoft can explain themselves here as to why they would have crippled us like that or what a proper approach for this common problem would be. Yet another reason the Calendar is a piece of garbage in SharePoint 2013!
Also this answer:
There is no OOTB way to attach Javascript with calendar view (no property exposed for that listview). For a workaround you can create your own JQUERY or JAVASCRIPT and add on calendar view page by adding the reference in Content Editor Webpart on that page.,
However I have a quick but dirty solution. Add a SriptEditor to yout page, below the calendar and insert:
var oldEditLink = EditLink2;
EditLink2 = function(a,b,c){
if (isNaN(b) && b.substring(0,3) == "WPQ"){
var itemId = a.getAttribute("href").split("=")[1];
// do what you want to do
return false;
}
oldEditLink(a,b,c);
}
I would like to create an announcement list webpart that shows the information like in this image I found googling:
Information is being shown in a column style, date, title and body, instead of the regular table layout that comes out of the box (shown in the links webpart under News).
Is it possible to do this without development or SharePoint Designer?
Thank you.
Yes, it is definitely possible using SharePoint Designer 2010.
You need to understand How SharePoint renders the data of a list. It is all the magic of XSLT which transforms an XML data into an HTML document.
You can customize this XSLT to suit your needs and modify the render pattern of the list data.
You can start from here:
How to: Customize the Rendering of a Field on a List View
http://msdn.microsoft.com/en-us/library/office/ff606773(v=office.14).aspx
http://maulikdhorajia.blogspot.in/2011/06/sharepoint-2010-customizing.html
I would like to make a <a href:"TT:0123456789?Dial"> link in a Sharepoint foundation 2010 list. If I insert it in the column as a hyperlink/single item/rich text etc and hover on it, it respons like a link, but i cannot call with my Polycom (computer connected) VOIP phone. It will only click on the complete line.
I would really like to use the SP contactlist. What would be the solution to insert a clickable dial link?
Your solution would be to create a custom field type for this. Crete a column type that, for example, displays a phone icon with your link on it. When you click your icon it will call instead of just mark the entire row. Read more about it here.