text content management

15
Text Content Management

Upload: prodigyview

Post on 03-Dec-2014

900 views

Category:

Technology


1 download

DESCRIPTION

Learn how use text content of the content management system in ProdigyView.

TRANSCRIPT

Page 1: Text Content Management

Text Content Management

Page 2: Text Content Management

OverviewObjective

Learn how to manipulate text content of ProdigyView’s built-in content management system.

Requirements

Installed version of ProdigyView with a database

Understanding of base content

Estimated Time

10 minuteswww.prodigyview.com

Page 3: Text Content Management

Follow Along With Code Example

1. Download a copy of the example code at www.prodigyview.com/source.

2.Install the system in an environment you feel comfortable testing in.

3.Proceed to examples/content/TextContentExample.php

Page 4: Text Content Management

What Is Text Content?

Text content is content whose make up primarily consist of text information. Examples of text information is below but can be expanded upon depending on the needs of the cms and the developers imagination.

Books

Manuscripts

Documents

News Websites

Blogging

etc

Page 5: Text Content Management

Extends Base ContentLike the other content types, text content extends base content. This means it has all the fields that base content has in addition to the fields that describes a text.

Text Content Fields Base Content Fields

Page 6: Text Content Management

Create Text ContentText content is relatively easy to create. In an array, passed defined fields into PVContent::createTextContent method.

1. Define the content that will be stored as text content

2. Pass tha array to PVContent::createTextContent3. Return content id

Page 7: Text Content Management

Database View

Remember that the text content utilizes both the base content and text content fields. This is accomplished by joining two tables. Your two tables in the database should look something like below.

Page 8: Text Content Management

Text Content Fields

The previous slide only showed a few fields that can be set when defining product content. The complete list of fields that apply only to the product content type is:

Page 9: Text Content Management

Search for Text ContentUsing the syntax from the PV Standard Search Query, we can search for content related to text on the fields for both base content and text content.

1. Search based on the passed arguments

2. Pass args into getTextContentList() method3. Returns an array of arrays

that contains the list of event content

Page 10: Text Content Management

Iterate Through The ListNext we can iterate through the list of text content to see the data we just added.

1. Iterate through the fields base content

2. With the automatic joining of the tables, text content fields are also returned

Page 11: Text Content Management

Retrieving Text ContentText content can also be retrieved directly using the content id. The data associated with that event id will be returned in array.

1. Pass in the content id

2. Content is returned in an array

3. Or get the content id through the content’s alias

4. Get the values of the array by specifying the associated index

Page 12: Text Content Management

Updating Text ContentThat array that contains the information for updating an text content. Simply change a value at an index in the array and pass it to PVContent::updateTextContent() method. Remember the content_id variable is required.

1. Append to the content in the text_content field

2. Pass the array back to update

Page 13: Text Content Management

Deleting Text Content

The last action to take place is deleting the text content. To delete content, we pass the content id into PVContent::deleteContent method.

All the content types(audio, video, event, etc) use the PVContent::deleteContent method.

Page 14: Text Content Management

Review1. Create text content by passing an array of

arguments into PVContent::createTextContent()

2. PVContent::createTextContent() will return the id of the newly generated event content

3. Search for event content by using the syntax from PV Standard Search Query and passing those arguments into PVContent::getTextContentList()

4. Update content by passing an array of accepted fields in PVContent::updateTextContent(). The content_id must be present for this method to work.

5. Delete event content by passing the content_id into PVContent::deleteContent().

www.prodigyview.com

Page 15: Text Content Management

API ReferenceFor a better understanding of base content, visit the api by clicking on the link below.

PVContent

www.prodigyview.com

More Tutorials

For more tutorials, please visit:

http://www.prodigyview.com/tutorials