ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Channel field macro?

October 29, 2013 3:01pm

Subscribe [2]
  • #1 / Oct 29, 2013 3:01pm

    gnitlis

    1 posts

    Does anyone know if there is a feature or add-on in EE that allows us to call a channel field that outputs the content of other fields in that same channel? For example, if you had two fields, {first_half} and {second_half}, you could define a third field {whole} so that it outputs {first_half} :: {second_half}.

    Specifically, I’m trying to add an extra field to the default Structure navigation. By default, Structure only displays the entry’s title, but this can be changed using

    channel:title="channel_name:field_name|another_channel:another_field"

    However, the title I’d like to display combines the default title field, a Matrix field, and some html markup. Ideally, my code for the navigation would look like:

    {exp:structure:nav channel:title="series:series_navtitle"}{/exp:structure:nav}

    where the channel field {series_navtitle} would return

    {title} <span>({series_year}{start_year}–{end_year}{/series_year})</span>

    and might appear something like First Series (1980–1990) (if I make the span tags italicize the text).

  • #2 / Oct 30, 2013 8:45pm

    Rob Allen

    3114 posts

    You’d be better asking the Structure developers about this since it’s directly related to how Structure works, not the way EE generally works.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases