我正在写一个js文件
checkCookiesAccepted();
function checkCookiesAccepted() {
if (!$.cookie("acecptcookies")) {
showCookieBar();
attachPageChangedEvents();
}
}
function attachPageChangedEvents(){
// get all internal a hrefs and override onclick event so we can record acceptance
var siteURL = "http://" + top.location.host.toString();
//$("a[href^='"+siteURL+"'], a[href^='/'], a[href^='./'], a[href^='../'], a[href^='#']").click(acceptCookies);
$("#middle a").click(acceptCookies);
}
function acceptCookies(){
$.cookie("acecptcookies", "1", { path: '/', expires: 20*365 });
}
function showCookieBar(){
// create div elements to body element unless another is supplied
$("<div id='tscookiebar'><div>This site uses cookies. To find out more about the cookies this …
Run Code Online (Sandbox Code Playgroud) 我的页面显示了常规组件演示.我的本地计算机上有一个flash/video文件,我想在我的页面上传这个文件.我怎样才能做到这一点?
我有这个代码片段用于在我的页面上呈现组件:
<!-- TemplateBeginRepeat name="Components" -->
<!-- TemplateBeginIf cond="ComponentTemplate == 'HomePageCT'" -->
@@RenderComponentPresentation()@@
<!-- TemplateEndIf -->
<!-- TemplateEndRepeat -->
Run Code Online (Sandbox Code Playgroud)
请提供与Flash文件和视频文件相关的所有详细信息.
我开发了一个ASP.NET聊天应用程序.现在我想要与我的Tridion页面进行一些集成.为此,我需要为发布的页面提供一些代码隐藏文件.还有一个问题是我想在我的页面中添加一个带有click事件的按钮.我怎样才能做到这一点?我做了什么:
<%@ Page language="c#" Inherits="SDLchat.ChatWin" CodeFile="ChatWin.aspx.cs" %>
<%@ Register src="ChatLogin.ascx" TagName="c2" TagPrefix="uc2" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>ChatWin</title>
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<asp:Panel ID="Panel1" runat="server">
<uc2:c2 ID="log2" runat="server" />
</asp:Panel>
<asp:Panel ID="Panel2" runat="server" Visible="False">
<asp:LinkButton ID="LinkButton1" runat="server"
onclick="LinkButton1_Click">Change Room</asp:LinkButton>
</asp:Panel>
</form>
</body>
</HTML>
Run Code Online (Sandbox Code Playgroud)
这是我想要在Tridion中迁移的ASP.NET Web应用程序.请帮忙
我在asp中有很多图像
<img src="site.com/img" class="post-image" alt="a long description"/>
<img src="site.com/img_1" class="post-image" alt="a long description2"/>
Run Code Online (Sandbox Code Playgroud)
图片标签中没有标题.我需要使用alt文本来设置每个图像的标题.我正在使用jquery来实现这一目标
<script type="text/javascript">
$('img').attr('title',$(this).attr('alt'));
</script>
Run Code Online (Sandbox Code Playgroud)
它不起作用,我错过了什么.请帮忙.
using TDS = Tridion.ContentManager.Interop.TDS;
using Tridion.ContentManager.Interop.TDS;
using Tridion.ContentManager.Interop.TDSDefines;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using System.Collections.Generic;
using System.Xml.Linq;
namespace ConsumerHealth.Web
{
class Common
{
public Common()
{
}
public TridionCollection<Publication> getAllPublicationList()
{
TDSE objTom = new TDSE();
try
{
TridionCollection<Publication> publications = new TridionCollection<Publication>(objTom.GetListPublications(ListColumnFilter.XMLListIDAndTitle));
return publications;
}
catch (Exception ex)
{
throw ex;
}
finally
{
Marshal.ReleaseComObject(objTom);
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
public TridionCollection<Publication> getAllPublicationList()
,它显示了TridionCollection无法找到的错误,我错过了什么,我应该使用哪个dll,除了这一切都正常.
我必须创建一个自定义页面,其中包含所有页面的列表及其在出版物中的发布日期.有人可以指导我如何使用此代码在自定义页面中获取发布日期吗?
private ItemType GetTridionItemType(RepositoryLocalObjectData source)
{
string itemType = source.GetType().Name;
switch (itemType)
{
case "PageData":
return ItemType.Page;
}
return ItemType.UnknownByClient;
}
private string CreateNewItemCopy(string title, RepositoryLocalObjectData source,
string filename)
{
ItemType tridionItemType = GetTridionItemType(source);
string orgItemUri = source.LocationInfo.OrganizationalItem.IdRef;
var newItem = client.Copy(source.Id, orgItemUri, true, new ReadOptions());
newItem.Title = title;
if (tridionItemType == ItemType.Page)
{
PageData pageData = newItem as PageData;
pageData.FileName = filename;
client.Update(pageData, new ReadOptions());
}
else
{
client.Update(newItem, new ReadOptions());
}
return newItem.Id;
}
Run Code Online (Sandbox Code Playgroud) <?xml version="1.0" standalone="yes"?>
<tcm:Error ErrorCode="80040302" Category="16" Source="Kernel" Severity="2" xmlns:tcm="http://www.tridion.com/ContentManager/5.0"><tcm:Line ErrorCode="80040302" Cause="false" MessageID="4613"><![CDATA[Unable to get list of Publication items.]]><tcm:Token>RESID_4485</tcm:Token><tcm:Token>RESID_4452</tcm:Token></tcm:Line><tcm:Line ErrorCode="80040302" Cause="false" MessageID="4394"><![CDATA[Unable to Initialize TDSE object.]]><tcm:Token>RESID_4537</tcm:Token><tcm:Token>TDSE</tcm:Token></tcm:Line><tcm:Line ErrorCode="80040302" Cause="true" MessageID="16226"><![CDATA[Access is denied for the user IIS APPPOOL\publishedlist.]]><tcm:Token>IIS APPPOOL\publishedlist</tcm:Token></tcm:Line><tcm:Details><tcm:CallStack><tcm:Location>Tridion.ContentManager.Security.AuthorizationManager.LoadAccessToken(String,IEnumerable`1,IEnumerable`1)</tcm:Location><tcm:Location>Tridion.ContentManager.Security.AuthorizationManager.LoadAccessToken(String,String)</tcm:Location><tcm:Location>Tridion.ContentManager.Session..ctor(String,String,UserContext)</tcm:Location><tcm:Location>Tridion.ContentManager.BLFacade.SystemFacade.InitializeUserContext(UserContext,String,String)</tcm:Location><tcm:Location>UtilitiesTDS.GetUserContext</tcm:Location><tcm:Location>TDSE.Initialize</tcm:Location><tcm:Location>TDSE.GetListPublications</tcm:Location></tcm:CallStack></tcm:Details></tcm:Error>
Run Code Online (Sandbox Code Playgroud)
执行此行时发生此错误:
TridionCollection<Component> components = new TridionCollection<Component>(folder.GetListItems(ListColumnFilter.XMLListExtended, rowFilter), "[contains(@IsShared,'false') and contains(@IsLocalized,'false') ]");
Run Code Online (Sandbox Code Playgroud)