User Tools

Site Tools


api:contents

This is an old revision of the document!


Методы для работы с контентами

GetContentID

int GetContentID(string content_name)

Возвращается ID контента по его имени. Поддерживаются кросс-сайтовые вызовы.

GetContentUploadUrl

string GetContentUploadUrl(string content_name)

– Возвращает url для библиотеки контента по заданному имени.

GetContentUploadUrlByID

string GetContentUploadUrlByID(int content_id)

- Returns upload url to content files for a given content by content id.

GetContentItemLinkIDs

string GetContentItemLinkIDs(string linkFieldName, long itemID)
string GetContentItemLinkIDs(string linkFieldName, string itemID)

Возвращает значения заданного поля M2M (параметр linkFieldName) для данной статьи (itemID) в виде списка идентификаторов связанных статей, разделенных запятыми.

Пример:

GetContentItemLinkIDs("Authors", Field(Data.Rows[e.Item.ItemIndex], "content_item_id"));

– Same as the previous method but itemID could be a comma-delimited list of article id’s

GetContentItemLinkQuery

string GetContentItemLinkQuery(string linkFieldName, string itemID)

– Similar to GetContentItemLinkIDs. The difference is that current method doesn’t execute the resulting SQL-query, but returns it as text.

GetLinkIDs

string GetLinkIDs(string LinkFieldName)

– Only for backward compatibility with “ASP.NET like ASP” type of assembly. It’s not recommended to use this method. Works only in objects of type “Publishing Container”, same as GetContentItemLinkIDs(string linkFieldName, string itemID) but assumes a presence of a field collection with “content_item_id”.

GetContentItemLinksFilter

string GetContentItemLinksFilter(int itemID, string contentName)

– Deprecated. GetContentItemLinkIDs replaced this method.

GetContentData

DataTable GetContentData( 
          string siteName,
          string contentName,
          string whereExpression,
          string orderExpression,
          long startRow,
          long pageSize,
          ref long totalRecords,
          byte useSchedule,
          string statusName,
          byte showSplittedArticle,
          byte includeArchive)

- Returns DataTable with a list of articles from a given content using parameters from “Object Parameters” of Publishing Container. Enables non-QP7 components to receive data from QP7 CMS.

siteName – site name, contentName – content name, whereExpression – filter / where clause, orderExpression - order by expression, startRow – specifies which row will become the first row in DataTable (all rows before it are not returned, used for paging), pageSize number or records to be returned, totalRecords - returns total number of records that would be returned by applying only filter (other parameters are not used), useSchedule – specifies whether or not to return currently invisible articles, statusName – specifies article status, showSplittedArticle – whether or not to show “split” articles (version that is currently in a workflow in the backend), includeArchive – specifies whether or not to show archived articles.

Discussion

Enter your comment
 
api/contents.1283243826.txt.gz · Last modified: 2010/08/31 11:37 by celutp