Брзо Совет: Содржината Пребарување Веб Дел, Пронајди колона вредност и XSL

I have a column name in a content type named "Real Estate Location".

That column is of type "lookup".

Имам пат е изменета <CommonViewFields> и ItemStyle.xsl да се покаже на колоната.

Едноставен <XSL:вредност на одберете =…> се враќа назад внатрешна вредност, која вклучува реден позиција на податоци, како што се:

1;#Мајами

За да се добие човек-пријателски вредност, го користите XSL подниза-по, како што е прикажано:

<XSL:value-of select="substring-after(@ Real_x005F_x0020_Estate_x005F_x0020_Location,'#')"></XSL:вредност на>

Use this technique whenever you are working with lookup values in XSL transforms and need to get the human-friendly value.

<крај />

Technorati Тагови: , ,

3 размислувања за "Брзо Совет: Содржината Пребарување Веб Дел, Пронајди колона вредност и XSL

  1. Vivian

    Здраво Пол,

    It looks like what you are describing here is the solution to what I need, but am unfortunately a newbie in XSL and can’t figure it out from your post above.

    Let me quickly explain what I am trying to do and what I need and would greatly appreciate your help 🙂

    Јас сум создавање на производот страници во документот библиотека и во оваа библиотека Јас сум асоцирањето вредности преку колони на секоја страница, e.g. Страница име: Product A and in that row a column "Market applicability". The values that are available for "market applicability" се во сопствен список во посебен библиотека и се увезени преку погледнете-up и потоа се дефинира дека разни опции се можни (во таа колона).

    Сега да речеме производот А е достапен во САД & Канада и ние избираме оние во колона атрибути на страница. Јас би сакал да имаат САД & Канада тогаш се појавуваат на самата страница и мислам дека она што се зборува погоре е одговорот на моето прашање – Сега голем П е точно како можам да ја спроведе?

    My company does not allow me to work with sharepoint designer and we do not have the DFWP web part available :s so I have been doing the majority of my alterations with code in CEWP (I also have a XML/XSL web part available if that helps).

    The only solution that my web management team has given me is to create an alternative view of the product page document library for that product and include that view in my page – however given that we have over 200 products and I have this issue with 4 columns (market applicability, target audience, итн) I do not want to spend my time creating 1,000 views.

    My site structure is as follows:
    Product A page: https://domain.com/sites/mysitename/productpages/ProductA.aspx
    Product page document library: https://domain.com/sites/mysitename/productpages/Forms/AllItems.aspx
    Original list with values: https://domain.com/sites/mysitename/Lists/Market applicability/AllItems.aspx

    Could you please advise me what code I need to use in order to include the market applicability values of "US & Canada" (во овој случај) in my product page?

    Thanks so much for your help!

    Vivian

  2. Нема име
    Hi,
    Any advice on why I cannot get my lookup columns to display on the Content Query Web Part? Did you have to do anything special in your <CommonViewFields> for lookups?
    TIA,
    Dave
  3. Chris
    Paul,
    Thank you so much for this great tip! I will be using this in a up-and-coming project, and you have helped me get off on a good foot already!
    Ви благодариме повторно! (And I didn’t get you anything for Christmas!)
    Chris

Остави Одговори на Нема име Откажи одговор

Вашата е-маил адреса нема да бидат објавени. Задолжителни полиња се означени *