2012-09-03 29 views
1

我正在使用SDL Tridion 2011.我創建了字段類型「文本」的組件,並將已發佈的組件鏈接到其中的文本。Tridion組件鏈接未解決

之後,我已經插入組件到一個頁面,併發布(我使用鏈接解析器TBB)。當我在瀏覽器中查看該頁面,鏈接沒有出現,當我檢查代碼,按照地方鏈接被wriiten

<tridion:ComponentLink runat="server" PageURI="tcm:150-12575-64" 
    ComponentURI="tcm:150-12344" TemplateURI="tcm:0-0-0" AddAnchor="false" 
    LinkText="component" LinkAttributes=" title=&#34;Video link&#34; 
    target=&#34;_blank&#34; " TextOnFail="true"/> 

模板類型爲複合模板和代碼: -

<CompoundTemplate xmlns="http://www.tridion.com/ContentManager/5.3/CompoundTemplate"> 
    <TemplateInvocation> 
    <Template xlink:href="tcm:150-12576-2048" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:title="Test" /> 
    <TemplateParameters> 
     <Parameters xmlns="uuid:b81e2790-ded1-4fb2-b09a-4a2975c2938e" /> 
    </TemplateParameters> 
    </TemplateInvocation> 
    <TemplateInvocation> 
    <Template xlink:href="tcm:150-12176-2048" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:title="Default Finish Actions" /> 
    <TemplateParameters> 
     <Parameters xmlns="uuid:a13c5753-adfc-4e93-912f-ee3d93b6a828" /> 
    </TemplateParameters> 
    </TemplateInvocation> 
</CompoundTemplate> 
+0

能否請你分享組件模板中的一段代碼用於顯示組件詳細信息? –

+0

@HustonLopes:我在 – user1573378

+1

之上包含了組件模板代碼您確定鏈接正在運行,否則在網站中的哪個位置以及使用組件的頁面(tcm:150-12344)實際上已發佈? –

回答

6

的鏈接Resolver TBB將根據您的部署者和/或發佈目標的配置將組件鏈接解析爲ASP.NET或JSP標籤。看着你的標籤,它被解析爲一個ASP.NET標籤(從runat="server"屬性來判斷)。

現在爲了使它工作,您必須確保您爲ASP.NET Web應用程序配置API服務器角色,當然您的頁面需要具有正確的文件擴展名(通常爲.aspx)以確保它們中的標記被執行。

簡單地說,您需要做的就是註冊SDL Tridion Dynamic Link標籤的標籤前綴。你在你的WEP應用web.config文件做到這一點,如下所示:

<configuration> 
    <system.web> 
     <pages> 
      <controls> 
       <add tagPrefix="tridion" 
        namespace="Tridion.ContentDelivery.Web.UI" 
        assembly="Tridion.ContentDelivery" /> 
      </controls> 
     </pages> 
    </system.web> 
</configuration> 

更多關於這個話題可以在我們的在線文檔中找到:Configuring the API server role for a .NET Web application(需要,請參閱here瞭解詳細信息登錄)

+0

謝謝,它的工作。 – user1573378

+0

問題是什麼? –

相關問題