P
P
Pavel Bogdanov2016-01-25 19:00:19
XSL & XSLT
Pavel Bogdanov, 2016-01-25 19:00:19

How to display a field from the full news to the announcement?

Good afternoon! I am new to UMI, so the question may seem childish. How can I display a field or group from the full news item to the announcement. The fact is that when displaying the full news, the item method is used, and when announcing rubric. Adding the second method to the announcement template does not give any result. As well as calling a field in an xslt template using a regular select. Maybe someone has already faced such a problem.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
i, 2016-01-25
@rebirther23

Any field or group of any page can be obtained through the UPage protocol , an example of displaying the value of the content field :

<xsl:value-of 
  select="document(concat('upage://', @id, '.content'))//value"
  disable-output-escaping="yes" />

@id is the page id that can be retrieved in the current context, and the page path can also be used.
The essence of the example comes down to building a query: concat('upage://', @id, '.content'))as a result, there will be a call to the address upage://1.content(with @id=1), and a //valuecall to the node of the resulting XML.
The UPage protocol can be tested in the browser, for example: http://site.com/upage/1.content or http://site.com/upage/1to get the entire page.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question