我正在使用SDL Tridion 2011 SP1中的Core Service 2011开发Schema.
我只是想知道是否可以使用Core Services创建自定义数据类型(或实际上是Schema字段内容的验证器).
例如:我想创建一个包含以下详细信息的Schema字段:
bodyparagraphtexttext长度为10个字符有人可以分享一些想法吗?
谢谢
在模板匹配中实现和条件
<xsl:template match="a[!(img)and(not(@id))]">
Run Code Online (Sandbox Code Playgroud)
我想写一个这样的模板
a tag should not have attribute id and should not be followed by img tag.
Run Code Online (Sandbox Code Playgroud)
但它显示错误.任何人都可以帮忙
我正在努力在用户创建页面时触发事件以自动创建页面.
namespace TestEventHandler
{
[TcmExtension("MyEventHandlerExtension")]
public class MyEventHandler : TcmExtension
{
public MyEventHandler()
{
Subscribe();
}
public void Subscribe()
{
EventSystem.Subscribe<Page, SaveEventArgs>(HandlerForProcessed, EventPhases.Processed);
//EventSystem.Subscribe<Page, PublishEventArgs>(HandlerForInitiated, EventPhases.Initiated);
}
private void HandlerForProcessed(Page subject, SaveEventArgs args, EventPhases phase)
{
//create page.
Tridion.ContentManager.Session mySession = new Tridion.ContentManager.Session(@"user");
XmlElement XmlElement = null;
Page newPage = new Page(XmlElement, mySession);
newPage.Title = subject.Title + "_auto";
newPage.FileName = subject.FileName + "_auto";
newPage.PageTemplate = subject.PageTemplate;
newPage.Save(true);
newPage.CheckOut();
}
}
}
Run Code Online (Sandbox Code Playgroud)
它不是自动创建页面.我认为这段代码需要进行一些修改.
我收到错误"此用户模拟需要将Machinename\MTSUser帐户配置为模拟用户".
有人可以帮助进行所需的修改吗?我正在使用TOM.net API.
谢谢.
我正在使用SDL Tridion 2011 SP1中的核心服务2011创建组件.
我只想知道,当我在本地计算机中直接使用组件源XML时,是否可以获取模式名称.
考虑我将ABCD.xml存储在本地计算机中.我想将此ABCD.xml作为输入获取它正在使用的模式.
是否有可能通过核心服务2011,如果是,请分享您对它的看法.
只是在我的本地计算机上有一个示例内容xml文件.是这里.
<Content xmlns="uuid:someUUID">
<first>first filed</first>
<second>second field</second>
</Content>
Run Code Online (Sandbox Code Playgroud)
谢谢.
我已经发布了一个带DCP的ASPX页面.
<html>
<head>
</head>
<body>
<tridion:ComponentPresentation runat="server" PageURI="tcm:9-5251-64" ComponentURI="tcm:9-5245" TemplateURI="tcm:9-5247-32"/>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
有哪些方法可以执行此页面,以便呈现DCP.
我刚尝试通过IIS浏览此页面,我收到解析器错误.
Unknown server tag 'tridion:ComponentPresentation'
Run Code Online (Sandbox Code Playgroud)
如果有人可以指导我运行这个页面,那就太棒了.
提前致谢
我的组件"somefield"中有一个关键字字段.它有一个关键和价值.
key: msg
Value: message
Run Code Online (Sandbox Code Playgroud)
是否可以直接在DreamWeaver中检索关键字的键值.
任何人都可以帮助我
谢谢,谢谢
我收到数据库异常.
无法为数据库'MyDatabse'中的对象'dbo.ITEMS'.'PK_ITEMS'分配空间,因为'PRIMARY'文件组已满.通过删除不需要的文件,删除文件组中的对象,向文件组添加其他文件或为文件组中的现有文件设置自动增长来创建磁盘空间.
我目前的数据库大小是10GB.

我的服务器详情是

是否有任何限制R2只支持10GB.我们怎么能增加这一点.
我正在尝试在 jsf 中使用以下代码打开一个弹出窗口。
<a href="#" data-toggle="modal" data-backdrop="static" data-target="#forgotPassword">Forgot password</a>
<div class="modal fade" jsf:id="forgotPassword">
<div class="modal-dialog">
<form jsf:id="reset-password-form">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Request for new password</h4>
</div>
<div class="modal-body">
<div class="form-group">
<label for="inputEmail">EmailId</label>
<div class="col-sm-9">
<input type="text" class="form-control" jsf:id="inputEmail"
jsf:value="#{myBean.passwordResetEmail}"
name="inputEmail" />
<h:message for="inputEmail" />
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button class="btn btn-primary"
jsf:action="#{myBean.resetPassword}">sendPassword</button>
</div>
</div>
</form>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
我在这里面临一些问题。
任何人都可以帮助我如何做到这一点。
我在我的 JSF 2.2 webapp 中有一个自定义异常映射在 web.xml 中,如下所示。
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>Project</display-name>
<!-- Welcome page -->
<welcome-file-list>
<welcome-file>index.xhtml</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<session-config>
<!-- some codes-->
</session-config>
<error-page>
<exception-type>se.telenor.ocfd.service.api.exception.CustomNotFoundException</exception-type>
<location>/not_found.xhtml</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/404.xhtml</location>
</error-page>
<error-page>
<location>/500.xhtml</location>
</error-page>
<error-page>
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
<location>/session_timeout.xhtml</location>
</error-page>
</web-app>
Run Code Online (Sandbox Code Playgroud)
我的例外是
@ApplicationException
public class CustomNotFoundException extends RuntimeException {
private static final long serialVersionUID = 1L;
public CustomNotFoundException(String message, Throwable cause) {
super(message, cause);
}
public CustomNotFoundException(String message) {
super(message);
}
}
Run Code Online (Sandbox Code Playgroud)
但是当异常发生时它会 …
我想替换标签的值
<h2>..</h2>
Run Code Online (Sandbox Code Playgroud)
与标签的内容
<h3>..<h3>
Run Code Online (Sandbox Code Playgroud)
我写了这样的剧本,
<!DOCTYPE html>
<html>
<body>
<div>
<h3><span><!-- Start Component Field: {"XPath":"tcm:Content/custom:Content/custom:addwidget[1]/custom:text[1]"} -->
<strong>Section Text</strong>
</span> </h3>
<h2>
<a title="Google" href="http://google.com">google.com</a>
</h2>
</div>
<script type="text/javascript">
var x=document.getElementsByTagName("div");
for (var i=0; i<x.length; i++) {
var children = x[i].getElementsByTagName('h2');
var demo= children["demo"].innerHTML;
var childd =x[i].getElementsByTagName('h3');
var all=childd["all"].innerHTML;
children["demo"].childNodes[0].innerHTML=all;
childd["all"].innerHTML=null;
}
</script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
规则:
在上面的示例中,我想将"google.com"替换为<h3>标记中的文本.但我没有得到输出.
需要输出.
<!DOCTYPE html>
<html>
<body>
<div>
<h2>
<a title="Google" href="http://google.com">
<span><!-- Start Component Field: {"XPath":"tcm:Content/custom:Content/custom:addwidget[1]/custom:text[1]"} -->
<strong>Section Text</strong>
</span>
</a>
</h2>
</div> …Run Code Online (Sandbox Code Playgroud)