Event Content Management Tutorial

15
Event Content

description

Learn how to manage event content in ProdigyView's content management system.

Transcript of Event Content Management Tutorial

Page 1: Event Content Management Tutorial

Event Content

Page 2: Event Content Management Tutorial

OverviewObjective

Learn how to manipulate event 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: Event Content Management Tutorial

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

www.prodigyview.com

Page 4: Event Content Management Tutorial

What Is Event Content?

Event content is content that is geared toward facilitating an event. This includes examples on the following list and other event types you can imagine.

Concerts

Parties

Shows

Movies

Calendars

etc

www.prodigyview.com

Page 5: Event Content Management Tutorial

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

Event Content Fields Base Content Fields

Page 6: Event Content Management Tutorial

Create Event ContentEvent content is relatively easy to create. In an array, passed defined fields into PVContent::createEventContent method.

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

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

Page 7: Event Content Management Tutorial

Database View

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

Base Content Table

Event Content Table

Page 8: Event Content Management Tutorial

Event Content Fields

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

Event location

Event start date

Event end date

Event city

Event state

Event zip

Event country

Undefined end time

Event longitude

Event latitude

Event src

Event contact

Event map

Event address

www.prodigyview.com

Page 9: Event Content Management Tutorial

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

1. Search based on the passed arguments

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

that contains the list of event content

www.prodigyview.com

Page 10: Event Content Management Tutorial

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

1. Iterate through the fields and values for base content

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

Page 11: Event Content Management Tutorial

Retrieving Event ContentEvent 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: Event Content Management Tutorial

Updating EventThe array that contains the information for an event can also be used for updating an event. Simply change a value at an index in the array and pass it to PVContent::updateEventContent() method. Remember the content_id variable is required.

1. Set a new value for the event city

2. Pass the array back to update

Page 13: Event Content Management Tutorial

Deleting Event Content

The last action to take place is deleting the event 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.

www.prodigyview.com

Page 14: Event Content Management Tutorial

Review1. Create event content by passing an array of

arguments into PVContent::createEventContent()

2. PVContent::createEventContent() 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::getEventContentList()

4. Update content by passing an array of accepted fields in PVContent::updateEventContent(). 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: Event Content Management Tutorial

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