I'm extremly new with Sharepoint 2010. In my masterpage, I display a list of news. I'd like to create a permanant "Add news" at the bottom of the list (programmatically) but I can't find the ListId. I've seen on the web I have to use {ListId} token, but I can only do this in XSLT files.
Here is a piece of my masterpage's code :
<a class="ms-addnew" id="idHomePageNewAnnouncement" href="http://thisWebsite/_layouts/listform.aspx?PageType=8&ListId={ListId}&RootFolder=" onclick="javascript:NewItem2(event, "http://thisWebsite/_layouts/listform.aspx?PageType=8&ListId={ListId}&RootFolder=");javascript:return false;" target="_self">Add news</a>
I tried to replace ListId by ListID, List, $List etc... the generated link is always the same :
http://thisWebsite/_layouts/listform.aspx?PageType=8&ListId={ListId}&RootFolder=
Obviously, it didn't work because {ListId} is not replaced by its value...
Can somebody tell me where I'm wrong ? Thanks in advance :-)