• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

[XF1] How to place custom Item Fields in templates?

Hi Bob,

Trying to place a custom field into the index and category page under each item.

Currently only "Title & Description" is visable under each item thumb.... I would like to also show "Location and Price"

I used {$customFieldsGrouped.tab1.price.field_value} but it does not show.

Guess self placement only works in the item page?

Thanks

C
 
Hi Conrad :)

Currently, I only expose custom fields on the item view itself. I have a note on my white board to look into exposing them elsewhere, but if you want, you can create a thread in the Suggestions requesting that custom field data be exposed outside of just the item views themselves (ie, in Category View, Member View, Index View etc.).

-B
 
Custom fields in Showcase 2.0.0 has change dramatically.

Here is an example on how to use custom fields in Showcase 2.0.0

This example uses the new HELPERS (Field Title and Field Value). selfplace1 = the custom field ID for this example
HTML:
<xen:if is="{$item.customFields.selfplace1}">
    <div class="customShowcaseFields tab1">
        <dl class="customShowcaseFieldselfplace1">
            <dt>{xen:helper showcaseFieldTitle, 'selfplace1'}:</dt>
            <dd>{xen:helper showcaseFieldValue, $item, 'selfplace1', {$item.customFields.selfplace1}}</dd>
        </dl>
    </div>
</xen:if>

This is how you'd use the RAW field value
HTML:
{$item.customFields.selfplace1}

This is how you'd use the helper formated field value only.
HTML:
{xen:helper showcaseFieldValue, $item, 'selfplace1', {$item.customFields.selfplace1}}
 
Custom fields in Showcase 2.0.0 has change dramatically.

Here is an example on how to use custom fields in Showcase 2.0.0

This example uses the new HELPERS (Field Title and Field Value). selfplace1 = the custom field ID for this example
HTML:
<xen:if is="{$item.customFields.selfplace1}">
    <div class="customShowcaseFields tab1">
        <dl class="customShowcaseFieldselfplace1">
            <dt>{xen:helper showcaseFieldTitle, 'selfplace1'}:</dt>
            <dd>{xen:helper showcaseFieldValue, $item, 'selfplace1', {$item.customFields.selfplace1}}</dd>
        </dl>
    </div>
</xen:if>

This is how you'd use the RAW field value
HTML:
{$item.customFields.selfplace1}

This is how you'd use the helper formated field value only.
HTML:
{xen:helper showcaseFieldValue, $item, 'selfplace1', {$item.customFields.selfplace1}}
Hey Bob, I'm trying to use the helper formatted field value example you posted, but I'm getting "No View Registered" displaying for output.

Here's my code posted in the nflj_showcase_category_list template:
HTML:
<xen:if is="{$item.customFields.vehicle_model_trim}">
         {xen:helper showcaseFieldValue, $item, 'vehicle_year', {$item.customFields.vehicle_year}}
         {xen:helper showcaseFieldValue, $item, 'vehicle_model_trim', {$item.customFields.vehicle_model_trim}}
</xen:if>
What am I doing wrong?
 
That was one of the little bugs that was fixed in the last version. You can fix that by either upgrading OR downloading the latest version and only uploading the VIEW files (library/NFLJ/Showcase/ViewPublic).
 
That was one of the little bugs that was fixed in the last version. You can fix that by either upgrading OR downloading the latest version and only uploading the VIEW files (library/NFLJ/Showcase/ViewPublic).
Gotcha. Will get around to upgrading soon here. Having too much fun customizing. :)
 
Just upload the newest files for that directory ONLY (uploading other files will be a mismatch and things will be all FUBAR). You can safely upload all the new VIEW files tho.
 
The members are loving showcase BTW. I can't wait to extend it a little more (adding showcase items to postbit or the sig area - have a question in another thread for you on that) and get my Timeslips and Dyno pages built to replace the old pages I had in vB. But overall they're loving having the showcases tied to their existing build threads. ;)
 
How did you add your review boxes like that, please share.
It's a custom star rating script and html, @Bob's got a better way to do it with a later version of Showcase that will have a rating field type you can use.

How i do it do now is with custom script but it means i have to give each item its own rating id's what means its not something that could be used to let users list items.
 
Bob, I am back and I have been spending a lot of time trying to get the output html box to output something correctly. You tried to help me previously, but your page didn't help or explain in a way I could understand. I can't find what I am looking for here or at xf. I attached what I have. I want to output anchor text to the url. Can you link me to a page that will show me how this box works? I know HTML/CSS, but as my opening thread showed...I still have no idea why the HTML Output box won't accept HTML. It seems straight forward, but it's not. What string do I put there? I know xf has it's own language, but I don't speak it and I can't find a dictionary.
output-html.jpg
 
Back
Top