Class PublishingBuiltIn
Inherited Members
Namespace: PnP.Framework.Modernization.Publishing
Assembly: PnP.Framework.dll
Syntax
public class PublishingBuiltIn : FunctionsBase
Constructors
PublishingBuiltIn(BaseTransformationInformation, ClientContext, ClientContext, IList<ILogObserver>)
Instantiates the base builtin function library
Declaration
public PublishingBuiltIn(BaseTransformationInformation baseTransformationInformation, ClientContext sourceClientContext, ClientContext targetClientContext, IList<ILogObserver> logObservers = null)
Parameters
Base Page transformation information |
Client The ClientContext for the source |
Client
|
IList<ILog
|
Methods
DefaultTaxonomyFieldValue(String, String, String)
Populate a taxonomy field based upon provided term id's. You can configure to optionally overwrite existing values
Declaration
public string DefaultTaxonomyFieldValue(string fieldValue, string termIdString, string overwriteString)
Parameters
System. List of term id's to set, multiple values can also be used when the taxonomy field is configured to accept multiple terms |
System. Static bool ('true', 'false') to indicate if the default term values have to be set in case the fiels already contains terms |
System. String with term information needed to set the taxonomy field |
Returns
System.
|
EmptyString()
Returns an empty string
Declaration
public string EmptyString()
Returns
System. Empty string |
Prefix(String, String, String)
Prefixes a string
Declaration
public string Prefix(string prefix, string content, string applyIfContentIsEmpty)
Parameters
System. Prefix to be applied |
System. Value to apply the prefix to |
System. Apply prefix also when the content field is empty |
Returns
System. Prefixed string |
PrefixAndSuffix(String, String, String, String)
Prefixes and suffixes a string
Declaration
public string PrefixAndSuffix(string prefix, string suffix, string content, string applyIfContentIsEmpty)
Parameters
System. Prefix to be applied |
System. Suffix to be applied |
System. Value to apply the prefix/suffix to |
System. Apply prefix/suffix also when the content field is empty |
Returns
System. Prefixed string |
StaticString(String)
Returns an the (static) string provided as input
Declaration
public string StaticString(string staticString)
Parameters
System. Static string that will be returned |
Returns
System. String provided as input |
Suffix(String, String, String)
Suffixes a string
Declaration
public string Suffix(string suffix, string content, string applyIfContentIsEmpty)
Parameters
System. Suffix to be applied |
System. Value to apply the suffix to |
System. Apply suffix also when the content field is empty |
Returns
System. Prefixed string |
ToAuthors(String)
Looks up user information for passed user id
Declaration
public string ToAuthors(string userId)
Parameters
System. The id (int) of a user |
Returns
System. A formatted json blob describing the user's details |
ToImageAltText(String)
Returns the image alternate text of a Publishing Image field value.
Declaration
public string ToImageAltText(string htmlImage)
Parameters
System. PublishingPageImage |
Returns
System. Image alternate text |
ToImageAnchor(String)
Returns the image anchor url of a Publishing Image field value
Declaration
public string ToImageAnchor(string htmlImage)
Parameters
System. Publishing Image field value |
Returns
System. Image anchor url |
ToImageCaption(String)
Returns the image caption of a Publishing Html image caption field
Declaration
public string ToImageCaption(string htmlField)
Parameters
System. Publishing Html image caption field value |
Returns
System. Image caption |
ToImageUrl(String)
Returns the server relative image url of a Publishing Image field value
Declaration
public string ToImageUrl(string htmlImage)
Parameters
System. Publishing Image field value |
Returns
System. Server relative image url |
ToPreviewImageUrl(String)
Returns a page preview image url
Declaration
public string ToPreviewImageUrl(string image)
Parameters
System. A publishing image field value or a string containing a server relative image path |
Returns
System. A formatted preview image url |