Register with your xenforo.com Username then 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.

Self placing fields

Discussion in 'Showcase Support' started by Brentnauer, Oct 1, 2014.

  1. Brentnauer

    Brentnauer New Member Showcase

    Is there a more detailed explanation somewhere on how to get self-place fields into a tab's template? The stuff I've found (http://addons.nfljunkies.com/threads/how-to-place-showcase-custom-fields-in-templates.499/#post-4178) seems to assume some knowledge that I don't have.

    I seem to recall older version of Showcase allowing the customization of an item's templates from the category options page... Are we supposed to be editing the nflj_showcase_item template directly? How would I target a specific tab, or a category?
  2. Bob

    Bob Developer Staff Member

    I'll attempt to write something up that might make it a bit clearer, however it is an advanced featured that requires understanding of template modification along with xen syntax knowledge.

    Self place fields require editing of templates and placing specific xen syntax code to display a specific field.

    Showcase has never had anything like you are referring to (altho, you might be thinking of Category Content which is just an HTML field that can be displayed on a given category page). That is still an option, but it can't use selfplace fields.

    If you give me an idea of what you are wanting to do (the number and type of fields and where you want them) I could probably get your started :)
  3. Brentnauer

    Brentnauer New Member Showcase

    Thanks, @Bob B

    I suppose what would help most is to see an example like:

    <if category = "books">
    <if field =! empty>
    <output for field "book_isbn">
    <other content>

    <if category = "books" & tab="2">
    <if field =! empty>
    <output for field "book_amazon_link">
    <other content>

    <else "proceed as normal">

    (along with where in the template to put all that!)

    Hopefully that makes sense.
  4. Brentnauer

    Brentnauer New Member Showcase

    Hi Bob! I'm cycling back on this - Any progress with some more documentation?

  5. Bob

    Bob Developer Staff Member

    No :( I've been so completely wrapped up in getting SC 2.3.0 and AMS 1.x released that I've not had time for anything else. Is there something specific you are wanting to do?
  6. Brentnauer

    Brentnauer New Member Showcase

    No worries! From the changelogs I see since my last experiments with this, you've been working your ass off on this thing. Good work man :)

    Here's an example of what I'm trying to do:
    I'm building a database of movies within a certain sub genre and would like to display a rating in the sidebar. I can set up a simple text field for this and enter "80%" or something as the value, but I'd also like to have that text link to a page based on the value of another field.

    How would I go about doing that?
  7. Bob

    Bob Developer Staff Member

    You make them both "Self Placement" fields as far as the location of the field goes. Then you'd edit the nflj_showcase_item_sidebar template and create your custom sidebar block (easy stuff) and then use the self place custom field values to create your content for that block (which again is pretty easy once you see some examples and mess around with it a bit your self). I'll post some code later for you to experiment with :) (in the middle of some work at the moment)
  8. Brentnauer

    Brentnauer New Member Showcase

    This makes sense - If I can see an example or two then I can likely figure the rest out :) Thanks!
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.