Creating Actor Pages

From TMM Wiki
Jump to navigationJump to search
Actors Admin
The Actors Admin
Add Actor
Actor Photos
Actor Documents
Manage Attribute Types
Creating Actor Pages

CARMA allows you to create individual pages, or Site Sections, on your site(s) for each actor available in your system. These pages can display a wide variety of information, including the actor's bio, sample image, links to their galleries and videos, and the actor's rating. You can also allow surfers to rate the actor on these pages if you so choose.

To create an Actor Page in CARMA, you must first make sure that the page you are going to has an Actor ID number (actorid) in the URL. Without defining your actorid, this function will not display properly.

You can create a new page for your actors through the CARMA Sites Admin. Just click the "Manage Sections" action icon and use the green plus icon to add a new section. For more information on creating a new page in CARMA, please see our Site Sections wiki article.

Example Code

The following code will help you get started with created individual pages for your actors, along with their information, galleries, videos, and actor ratings. In the following code, the example actorid is defined as 7.

Insert the following sample code into the body template for the new Site Section you created for your actor. You can find this template by going to the Sites Admin, editing the templates for the site section you want to change, and customizing your body template.

http://<CARMA page>&actorid=7

{* get actor data *}
{carma_get_actor_data actorid=$smarty.request.actorid}

{* display actor data so you know what you have for templating *}

{* show galleries *}
{carma_search content_type=gal actor=$smarty.request.actorid}

{* show videos *}
{carma_search content_type=video actor=$smarty.request.actorid}

{* show rating and rating form *}
{if $}
You Rated This Actor {if $ == 8}an{else}a{/if} {$}
<form action="rating.php" method="GET" id=vote name=vote>
<input type="hidden" name="actorid" value="{$actor_data.actorid}">
<input type="hidden" name="type" value="actor">
<select name="rating">
<option value="1">1 - Worst</option>
<option value="2">2 - Bad</option>
<option value="3" selected>3 - Average</option>
<option value="4">4 - Good</option>
<option value="5">5 - Best</option>
<INPUT id=vote type=submit value=Vote name=vote>