Search code examples
phpcodeigniterexpressionengine

Expression Engine 2 Output Channel Field Title


Hi I am looping through a channel in EE2 and I am outputting all of the fields values but how do I output the fields title that I labeled it in the backend?

CODE:

<!-- Loop to out put a field called Location -->

{exp:channel:entries channel="vacancies"  disable="pagination|member_data|categories"}
    <p>{vacancy_location}{title}{/vacancy_location}: {vacancy_location}</p>
{/exp:channel:entries}

DESIRED OUTPUT:

<p>Location: Some Location</p>

Solution

  • What worked for me was installing SafeCracker module that is shipped with EE2 and using its {label:} tag

    http://expressionengine.com/user_guide/modules/safecracker/index.html#label-my-field-name