<%@ Page Language="C#" inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register tagprefix="WebPartPages" namespace="Microsoft.SharePoint.WebPartPages" assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register tagprefix="SharePoint" namespace="Microsoft.SharePoint.WebControls" assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<html dir="ltr">
<head runat="server">
<META name="WebPartPageExpansion" content="full">
<meta name="ProgId" content="SharePoint.WebPartPage.Document">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="../css/estilosnoticias.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/slides.min.jquery.js"></script>
<script type="text/javascript">
var listaHtmlmenu="";
//Linea a documentar en el manual
var Nombrelistamenu = "B7827432-35FB-4FD7-9C81-D3E4297A7CA3";
//var Nombrelistamenu = "MenuItems";
var vrurl='';
function queryList(pIdVista)
{
var soapEnv = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> "+
" <soapenv:Body> "+
"<GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>"+
"<listName>" + Nombrelistamenu + "</listName>" +
"<viewFields>" +
"<ViewFields>" +
"<FieldRef Name='ItemUrl' />" +
"</ViewFields>" +
"</viewFields>"+
"<query>"+
"<Query>" +
"<Where>" +
"<Eq>" +
"<FieldRef Name='Name' />" +
"<Value Type='Text'>"+pIdVista+"</Value>" +
"</Eq>" +
"</Where>" +"</Query>" +"</query> " + "</GetListItems>"+
"</soapenv:Body>" +
"</soapenv:Envelope>";
$.ajax({
url: "/_vti_bin/Lists.asmx",
type: "POST",
dataType: "xml",
data: soapEnv,
complete: processResultmenu,
async:false,
contentType: "text/xml; charset=\"utf-8\""
});
};
function processResultmenu(xData, status) {
$(xData.responseXML).find("z\\:row").each(function () {
vrurl = String($(this).attr("ows_ItemUrl"));
});
}
</script>
<style type="text/css" media="screen">
#slides
{
width: 400px;
}
.slides_container
{
width: 400px;
margin: 0;
padding: 0;
}
#frmNoticias
{
width: 400px;
}
</style>
<script type="text/javascript">
$(function(){
$('#slides').slides({
preload: true,
generateNextPrev: true,
effect: 'slide, fade'
});
});
</script>
<script type="text/javascript">
function pageLoad() {
_spOriginalFormAction = document.forms[0].action; _spSuppressFormOnSubmitWrapper = true;
}
</script>
</head>
<body scroll="no">
<form id="frmNoticias" runat="server">
<div class="newsPresentacionNoticias">
Noticias destacadas
</div>
<div id="slides">
<div class="slides_container">
<div>
<WebPartPages:SPWebPartManager runat="server" id="WebPartManager">
</WebPartPages:SPWebPartManager>
<WebPartPages:WebPartZone id="g_DA45396FE1E74195BA9B49E81D010F22" runat="server" title="Noticias Rotativas">
<ZoneTemplate>
<WebPartPages:DataFormWebPart runat="server"
SuppressWebPartChrome="False"
Description="" PartImageSmall="" DataSourceID=""
MissingAssembly="No se puede importar este elemento Web."
ListName="LstRotabannerContenidoDef"
FrameType="None"
ConnectionID="00000000-0000-0000-0000-000000000000"
DetailLink="" ExportControlledProperties="True" IsVisible="True" AllowRemove="True"
AllowEdit="True" ID="g_02006a51_ed07_49dd_85dc_1cac46c3928c"
ImportErrorMessage="No se puede importar este elemento Web."
Dir="Default"
FrameState="Normal"
DisplayName="LstRotabannerContenidoDef"
ViewContentTypeId=""
AllowConnect="True"
PageSize="4" Default="FALSE" AllowMinimize="True" IsIncludedFilter=""
ShowWithSampleData="False"
ChromeType="None"
HelpMode="Modeless" ExportMode="All"
ViewFlag="0" Title="LstRotabannerContenidoDef"
HelpLink="" AllowHide="True" AllowZoneChange="True"
PartOrder="1" UseSQLDataSourcePaging="True" PartImageLarge="" IsIncluded="True" NoDefaultStyle="TRUE"
__MarkupType="vsattributemarkup" __WebPartId="{02006A51-ED07-49DD-85DC-1CAC46C3928C}"
__AllowXSLTEditing="true" WebPart="true" Height="" Width="">
<DataSources>
<SharePoint:SPDataSource
runat="server" DataSourceMode="List"
SelectCommand="<Webs Scope='Recursive'></Webs><View><Query><OrderBy><FieldRef Name="Order"/></OrderBy></Query></View>"
UseInternalName="True"
IncludeHidden="True" ID="LstRotabannerContenidoDef1">
<SelectParameters>
<WebPartPages:DataFormParameter
ParameterKey="ListName"
PropertyName="ParameterValues"
DefaultValue="RotabannerContenido"
Name="ListName">
</WebPartPages:DataFormParameter>
<asp:Parameter DefaultValue="0" Name="StartRowIndex"></asp:Parameter>
<asp:Parameter DefaultValue="0" Name="nextpagedata">
</asp:Parameter>
<asp:Parameter DefaultValue="4" Name="MaximumRows">
</asp:Parameter>
<asp:Parameter DefaultValue="{listguid}" Name="ListID">
</asp:Parameter>
<asp:QueryStringParameter QueryStringField="RootFolder" Name="RootFolder" Type="String">
</asp:QueryStringParameter><asp:Parameter DefaultValue="{sitecollectionroot}" Name="WebUrl">
</asp:Parameter>
</SelectParameters><UpdateParameters><WebPartPages:DataFormParameter ParameterKey="ListID" PropertyName="ParameterValues" DefaultValue="{listguid}" Name="ListID"></WebPartPages:DataFormParameter>
</UpdateParameters><InsertParameters><WebPartPages:DataFormParameter ParameterKey="ListID" PropertyName="ParameterValues" DefaultValue="{listguid}" Name="ListID">
</WebPartPages:DataFormParameter>
</InsertParameters><DeleteParameters><WebPartPages:DataFormParameter ParameterKey="ListID" PropertyName="ParameterValues" DefaultValue="{listguid}" Name="ListID">
</WebPartPages:DataFormParameter>
</DeleteParameters>
</SharePoint:SPDataSource>
</DataSources>
<ParameterBindings>
<ParameterBinding Name="dvt_apos" Location="Postback;Connection"/>
<ParameterBinding Name="UserID" Location="CAMLVariable" DefaultValue="CurrentUserName"/>
<ParameterBinding Name="Today" Location="CAMLVariable" DefaultValue="CurrentDate"/>
<ParameterBinding Name="dvt_startposition" Location="Postback" DefaultValue=""/>
<ParameterBinding Name="dvt_firstrow" Location="Postback;Connection"/>
<ParameterBinding Name="dvt_nextpagedata" Location="Postback;Connection"/>
</ParameterBindings>
<DataFields>
@Title,Título;@Resumen,Resumen;@ImagenIcono,ImagenIcono;@PaginaInterna,PaginaInterna;@PaginaExterna,PaginaExterna;@Tags,Tags;@FechaPublicacion,FechaPublicacion;@FechaBaja,FechaBaja;@ID,ID;@ContentType,Tipo de contenido;@Modified,Modificado;@Created,Creado;@Author,Creado por;@Editor,Modificado por;@_UIVersionString,Versión;@Attachments,Datos adjuntos;@File_x0020_Type,Tipo de archivo;@FileLeafRef,Nombre (para uso en formularios);@FileDirRef,Ruta;@FSObjType,Tipo de elemento;@_HasCopyDestinations,Tiene destinos de copia;@_CopySource,Copiar origen;@ContentTypeId,Id. de tipos de contenido;@_ModerationStatus,Estado de aprobación;@_UIVersion,Versión de IU;@Created_x0020_Date,Creado;@FileRef,Dirección URL;
</DataFields>
<Xsl>
<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal">
<xsl:output method="html" indent="no"/>
<xsl:decimal-format NaN=""/>
<xsl:param name="dvt_apos">'</xsl:param>
<xsl:param name="dvt_firstrow">1</xsl:param>
<xsl:param name="dvt_nextpagedata" />
<xsl:variable name="dvt_1_automode">0</xsl:variable>
<xsl:template match="/" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls">
<xsl:call-template name="dvt_1"/>
</xsl:template>
<xsl:template name="dvt_1">
<xsl:variable name="dvt_StyleName">Table</xsl:variable>
<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row"/>
<xsl:variable name="dvt_RowCount" select="count($Rows)" />
<xsl:variable name="RowLimit" select="4" />
<xsl:variable name="FirstRow" select="$dvt_firstrow" />
<xsl:variable name="LastRow" select="$FirstRow + $dvt_RowCount - 1" />
<xsl:variable name="IsEmpty" select="$dvt_RowCount = 0" />
<table border="0" width="100%" cellpadding="2" cellspacing="0">
<tr valign="top">
<xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
<th class="ms-vh" width="1%" nowrap="nowrap"></th>
</xsl:if>
</tr>
<xsl:call-template name="dvt_1.body">
<xsl:with-param name="Rows" select="$Rows"/>
<xsl:with-param name="FirstRow" select="1" />
<xsl:with-param name="LastRow" select="$dvt_RowCount" />
</xsl:call-template>
</table>
<xsl:call-template name="dvt_1.commandfooter">
<xsl:with-param name="FirstRow" select="$FirstRow" />
<xsl:with-param name="LastRow" select="$LastRow" />
<xsl:with-param name="RowLimit" select="$RowLimit" />
<xsl:with-param name="dvt_RowCount" select="$dvt_RowCount" />
<xsl:with-param name="RealLastRow" select="number(ddwrt:NameChanged('',-100))" />
</xsl:call-template>
</xsl:template>
<xsl:template name="dvt_1.body">
<xsl:param name="Rows"/>
<xsl:param name="FirstRow" />
<xsl:param name="LastRow" />
<xsl:for-each select="$Rows">
<xsl:variable name="dvt_KeepItemsTogether" select="false()" />
<xsl:variable name="dvt_HideGroupDetail" select="false()" />
<xsl:if test="(position() >= $FirstRow and position() <= $LastRow) or $dvt_KeepItemsTogether">
<xsl:if test="not($dvt_HideGroupDetail)" ddwrt:cf_ignore="1">
<xsl:call-template name="dvt_1.rowview" />
</xsl:if>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template name="dvt_1.rowview">
<tr>
<xsl:if test="position() mod 2 = 1">
<xsl:attribute name="class">ms-alternating</xsl:attribute>
</xsl:if>
<xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
<td class="ms-vb" width="1%" nowrap="nowrap">
<span ddwrt:amkeyfield="ID" ddwrt:amkeyvalue="ddwrt:EscapeDelims(string(@ID))" ddwrt:ammode="view"></span>
</td>
</xsl:if>
<td class="ms-vb" style="border-bottom:#cccccc 1px dotted;">
<div class="newimagenalinear" style="width: 91px; height: 91px">
<img border="0" src="{substring-before(@ImagenIcono, ', ')}" alt="{substring-after(@ImagenIcono, ',')}" width="90" height="90" />
</div>
<div class="newscontenidoalinear">
<div class="newstitulo">
<xsl:value-of select="@Title" />
</div>
<div class="newsContenido">
<xsl:value-of select="@Resumen" disable-output-escaping="yes" />
<div class="newsfecha">
<br/>
<xsl:choose>
<xsl:when test="string-length(@PaginaExterna) != 0">
<a href="{substring-before(@PaginaExterna, ',')}" target="_blank">
<b>+ ver m�s...</b>
</a>
</xsl:when>
<xsl:otherwise>
<script type="text/javascript">
var idVista ='<xsl:value-of select="@PaginaInterna" />';
queryList(idVista) ;
if(vrurl=='undefined')
{
vrurl='#';
document.write( '<a class="newslinks" target="_blank">');
document.write( '<b>+ ver m�s... </b> </a>');
}else{
document.write( '<a class="newslinks" href="'+vrurl+'" target="_blank">');
document.write( '<b>+ ver m�s... </b> </a>');
}
</script> </xsl:otherwise>
</xsl:choose>
<br/>
<br/>
Fecha de la publicaci�n de la Noticia: <xsl:value-of select="ddwrt:FormatDate(string(@FechaPublicacion), 3082, 5)"/>
</div>
<br/>
</div>
</div>
</td>
<td class="ms-vb">
</td></tr>
</xsl:template>
<xsl:template name="dvt_1.commandfooter">
<xsl:param name="FirstRow" />
<xsl:param name="LastRow" />
<xsl:param name="RowLimit" />
<xsl:param name="dvt_RowCount" />
<xsl:param name="RealLastRow" />
<table cellspacing="0" cellpadding="4" border="0" width="100%">
<tr>
<xsl:if test="$FirstRow > 1 or $dvt_nextpagedata">
<xsl:call-template name="dvt_1.navigation">
<xsl:with-param name="FirstRow" select="$FirstRow" />
<xsl:with-param name="LastRow" select="$LastRow" />
<xsl:with-param name="RowLimit" select="$RowLimit" />
<xsl:with-param name="dvt_RowCount" select="$dvt_RowCount" />
<xsl:with-param name="RealLastRow" select="$RealLastRow" />
</xsl:call-template>
</xsl:if>
</tr>
</table>
</xsl:template>
<xsl:template name="dvt_1.navigation">
<xsl:param name="FirstRow" />
<xsl:param name="LastRow" />
<xsl:param name="RowLimit" />
<xsl:param name="dvt_RowCount" />
<xsl:param name="RealLastRow" />
<xsl:variable name="PrevRow">
<xsl:choose>
<xsl:when test="$FirstRow - $RowLimit < 1">1</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$FirstRow - $RowLimit" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="LastRowValue">
<xsl:choose>
<xsl:when test="$LastRow > $RealLastRow">
<xsl:value-of select="$LastRow"></xsl:value-of>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$RealLastRow"></xsl:value-of>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="NextRow">
<xsl:value-of select="$LastRowValue + 1"></xsl:value-of>
</xsl:variable>
<td nowrap="" class="ms-paging" align="right">
<xsl:if test="$dvt_firstrow > 1" ddwrt:cf_ignore="1">
<a>
<xsl:attribute name="href">javascript: <xsl:value-of select="ddwrt:GenFireServerEvent('dvt_firstrow={1};dvt_startposition={}')" />;</xsl:attribute>
Inicio</a>
<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&nbsp;</xsl:text>
<a>
<xsl:attribute name="href">javascript: history.back();</xsl:attribute>
<img src="/_layouts/images/prev.gif" border="0" alt="Previous" />
</a>
<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&nbsp;</xsl:text>
</xsl:if>
<xsl:value-of select="$FirstRow" />
- <xsl:value-of select="$LastRowValue" />
<xsl:text xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" ddwrt:nbsp-preserve="yes" disable-output-escaping="yes">&nbsp;</xsl:text>
<xsl:if test="$LastRowValue < $dvt_RowCount or string-length($dvt_nextpagedata)!=0" ddwrt:cf_ignore="1">
<a>
<xsl:attribute name="href">javascript: <xsl:value-of select="ddwrt:GenFireServerEvent(concat('dvt_firstrow={',$NextRow,'};dvt_startposition={',$dvt_nextpagedata,'}'))" />;</xsl:attribute>
<img src="/_layouts/images/next.gif" border="0" alt="Next" />
</a>
</xsl:if>
</td>
</xsl:template>
</xsl:stylesheet> </Xsl>
</WebPartPages:DataFormWebPart>
</ZoneTemplate></WebPartPages:WebPartZone>
</div>
</div>
</div>
<script type="text/javascript">
_uacct = "UA-783567-1";
urchinTracker();
</script>
</form>
</body>
</html>
Libreria de estilos estilosnoticias
<style type="text/css" media="screen">
.newsContenido {
padding-top: 10px;
padding-bottom: 2px;
font-size: 12px;
font-family: Arial, Helvetica, sans-serif !important;
text-align: justify;
vertical-align: top;
color: #666666;
}
.newstitulo {
color: #20469d;
text-decoration: none;
font-size: 13px;
font-family: Arial, Helvetica, sans-serif !important;
font-weight: bold;
}
.newsfecha {
color: #15568e;
text-decoration: none;
font-size: 10px;
font-family: Arial, Helvetica, sans-serif !important;
}
.newsimagen {
text-align: left;
vertical-align: top;
float: left;
width: 90px;
height: 90px;
}
.newimagenalinear {
text-align: left;
position: relative;
float: left;
vertical-align: top;
width: 100px;
height: 100px;
padding: 10px;;
}
.newscontenidoalinear {
position: relative;
float: right;
text-align: left;
vertical-align: top;
}
.newsfecha {
text-align: right;
font-family: Arial, Helvetica, sans-serif !important;
vertical-align: bottom;
}
.newslinks a {
color: #019eba;
font-family: Arial, Helvetica, sans-serif !important;
}
.newslinks a:link {
color: #019eba;
font-family: Arial, Helvetica, sans-serif !important;
}
.newslinks a:hover {
color: #019eba;
font-family: Arial, Helvetica, sans-serif !important;
}
.newslinks a:visited {
color: #019eba;
font-family: Arial, Helvetica, sans-serif !important;
}
.newslinks a:active {
color: #019eba;
font-family: Arial, Helvetica, sans-serif !important;
}
a {
text-decoration: none !important;
color: #15568e !important;
font-size: 12px;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif !important;
}
.newsPresentacionNoticias {
color: #1f469d;
width: 400px;
font-family: Georgia, "Times New Roman", Times, serif !important;
font-size: 16px;
font-weight: bold;
padding-bottom: 5px;
margin-bottom: 20px;
text-align: left;
vertical-align: bottom;
border-bottom: #cccccc 1px dotted;
background-color:#f5f5f5 ;
}
</style>