English 中文(简体)
Umbraco产出条件领域:项目
原标题:Output conditional field in Umbraco:item
  • 时间:2012-05-02 09:58:28
  •  标签:
  • umbraco

在乌布拉科挖掘一个领域,这很简单:

<umbraco:Item runat="server" field="introduction">

请允许我说,目前,Im在财产介绍中做了文章。 如果该条款的引入领域是空洞的,我想在家事点上产生一个更全球性的领域,请把它称为全球的介绍。

没有人知道如何这样做?

我知道<代码>xslt的任择属性,但不知道该属性是否足够......或确切地说,如何做到这一点。

问题回答

你们可以设定休庭=“真实”,使变式名称保持不变。 然后,当摩布拉科没有发现价值时,就会失去母子的价值。

<umbraco:Item runat="server" field="introduction" recursive="true">
<umbraco:item field="bodyText" useIfEmpty="altText" runat="server"/>




相关问题
Creating custom content sections with umbraco

I m working on an umbraco website just now and one of the requirements is to have a custom section in the back end that can be used to manage publish smaller micro-sites. I have been able to create ...

MVC and Umbraco integration

I ve followed the steps from http://memoryleak.me.uk/2009/04/umbraco-and-aspnet-mvc.html and integrated MVC in Umbraco with success, but I still have a problem which is critical for me. Is there any ...

Umbraco server error after install

I downloaded umbraco and used the web platform installer. Everything went though okay and it installed SQL Express 2008 and a new directory under the default website in IIS. However when I launch the ...

XSLT, sort and group by year-date

Regarding Umbraco XSLT version 1. I have aprox. 150 news items in XML. Lets say like this (all is pseudocode until I get more familiar with this xml/xslt): <news> <data alias=date>2008-...

Open node in Umbraco programmatically

I have created a dashboard for an Umbraco site and I want to link from it to various node in the tree. From what I can tell Umbraco uses editcontent.aspx?id={thenodeid} and javascript:opencontent({...

Umbraco Back Office Membership Provider

Has anyone had any experience trying to write a custom Membership Provider for the Umbraco back office? I ve run into all sorts of trouble trying to make this happen. You can see some more details ...

热门标签