Content Management - Base Content

16
Content Management – Base Content www.prodigyview.com

description

Learning the basics of using the content management system in ProdigyView.

Transcript of Content Management - Base Content

Page 1: Content Management - Base Content

Content Management – Base Content

www.prodigyview.com

Page 2: Content Management - Base Content

OverviewObjective

Learn the basics of the content management system in ProdigyView and how to manipulate base content.

Requirements

Installed version of ProdigyView with a database

Estimated Time

8 minutes

www.prodigyview.com

Page 3: Content Management - Base Content

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/BasicContentExample.php

www.prodigyview.com

Page 4: Content Management - Base Content

What is Content Management?

One of the features that ProdigyView offers is a built-in cms that supports all kinds of content including audio, video, file, event and ecommerce.

Important!

The content management is meant to be a way of quickly building sites and presenting a proof of concept or prototypes to stakeholders and decisions makers such as the CEO, Managers, and Investors.

The cms contains many extra fields that do not make suitable for a scaled production. If you are going to use the cms in production, remember to optimize your database.

www.prodigyview.com

Page 5: Content Management - Base Content

Base ContentBase content is the parent content for all the other content types. Whenever you are creating a different content type, you will be using base content.

Base Content

Audio Video EventE-

commerceFile

www.prodigyview.com

Page 6: Content Management - Base Content

Creating Base ContentCreating base content is relatively easy. It only requires defining fields and passing them into PVContent::createContent method.

1. Set the content arguments in an array

2. Pass the arguments into the createContent method

3. Return the id of the content

Page 7: Content Management - Base Content

Database CheckThe content should look something like this in your database.

www.prodigyview.com

Page 8: Content Management - Base Content

Base Content FieldsIn our last example, we only used three fields for creating content. When using base content, you have access to a variety of fields that can help you differentiate your content and set data. Below is a larger data set of fields that can be used.

content_idcontent_titlecontent_descriptionparent_contentapp_idowner_idcontent_meta_tagscontent_meta_descriptioncontent_thumbnailcontent_aliasdate_active

date_inactivedate_createddate_modifiedis_searchableallow_commentsallow_ratingcontent_activecontent_promotedcontent_permissionscontent_languagetranslate_content

content_approvedcontent_parameterssym_linkcontent_ordercontent_access_level

Page 9: Content Management - Base Content

Unique AliasOne of the features we skipped over before was the ability to create a unique content alias. The content alias is a unique human readable string identifier that can be given to any content type.

1. Create the unique alias based upon the based text content

2. Set the content alias in the args array

3. Create the content

Page 10: Content Management - Base Content

Searching For ContentSearching for content create is relatively easy. The PV Standard Search Query is used with PVContent::getContentList() method. This will return an array of arrays.

1. Search based on the passed arguments

2. Pass args into getContentList() method

3. Returns an array of arrays that contains the list of content

www.prodigyview.com

Page 11: Content Management - Base Content

Iterate Through Array

After we have retrieved out list of data, we can iterate through it. Each row will be the data associated with a different content id.

1. Iterate through the list of arrays

2. Get the information associated with each row

www.prodigyview.com

Page 12: Content Management - Base Content

Retrieving Content

Next we are going to retrieve content with a variable. Remember the id of the content that was returned before? We can use that for retrieving data associated with that id in the form of an array.

2. The content returned in an array

1. The ID of the content

Page 13: Content Management - Base Content

Updating The ContentWhen the array is returned, is contains all the data associated with that content id from the database. If we want to update the content, we change an index in the array and pass the content back.

1. getContentIDByAlias return the id of content with the alias2. Use the id and

retrieve the data associated with that id

3. Change a value in the content array 4. Pass the array in updateContent

Page 14: Content Management - Base Content

Deleting ContentThe final action when dealing with content is deleting. To delete the content, pass in the id of the content you want to delete into PVContent::deleteContent().

www.prodigyview.com

Page 15: Content Management - Base Content

Review1. Create base content by passing an array of

arguments into PVContent::createContent()

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

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

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

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

www.prodigyview.com

Page 16: Content Management - Base Content

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