The 'add new item' link which is always located at the end of the list.. is there a way that we can add a similar link at the top of the list..

link|improve this question

feedback

2 Answers

You can edit the page to add a Content Editor Web Part up top and adjust the chrome type so that title / borders / etc don't display. Then edit the content of the web part to be a hyperlink to the same place as the other one.

link|improve this answer
feedback

Not possible by just configuring web part. Of course you could modify the Title Url of the web part to point to the Add new item URL, but I don't count that as a valid suggestion ;)

I would use javascript (jQuery) to search for the bottom Add new item link and inject similar to the correct position below the web part title.

Some web parts also allow you to edit the XSL of the web part. I haven't tried this myself, but you might be able to achieve the same in certain web parts using this method.

jQuery example (not on my dev machine now, so will share the idea at least):

  1. Find the Add new item node using ID and get it's html: $('table[summary='yourtablename'] td[class='ms-addnew']).html()
  2. Find the web part table, it should have "summary" attribute that might be easiest to find $('table[summary='yourtablename'])
  3. Append the Add new item TD you got from step 1 wherever you wish, or get the TR above that TD and append the row below/above column header row of the table
  4. You may want to change the ID attribute of the actual link to some other as there might be conflicts if you have two links with same ID attribute in HTML)
link|improve this answer
Hi Jussi, could u provide a example as to getting the "add new item" link using jquery – spStacker Jan 31 at 15:23
Hi, edited the answer above. – Jussi Palo Feb 1 at 21:12
Thanks jussi for the reply.i will try it at work tomorrow – spStacker Feb 2 at 3:55
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.