Editing Content types

Options

Hi: I am trying to add a photo chooser to a content type. It now shows up when you create a new content type, however when you choose the choose butto nothing happens. I noticed that it is missing this line of code (uniqueid="78241845") that I found in another content type with a photo chooser. Thanks in advance.

Tagged:

Comments

  • Dana,

    Please make sure that you follow the following steps when creating the image-chooser field:

    • Insert a menu drop-down in the authoring form
    • Enter label for the field
    • Dynamically build menu options based on: A set of content items
    • Choose content filter: Select image filter or create a new one. If you want the chooser to land the author in a specific folder, create a filter that's restricted to that folder
    • Once you created the field, click to view the source code and insert <div class="image-chooser"> </div> around the <select....></select> item for image, so your final code looks like this: <div class="image-chooser"><select model="items;filterID=1046205" name="image" title="Image" validation="type:string"></select></div>
    • Save the authoring form

    I hope this helps. Let me know if any of these steps are not very clear.

  • Elizabeth M:

    Dana,

    Please make sure that you follow the following steps when creating the image-chooser field:

    • Insert a menu drop-down in the authoring form
    • Enter label for the field
    • Dynamically build menu options based on: A set of content items
    • Choose content filter: Select image filter or create a new one. If you want the chooser to land the author in a specific folder, create a filter that's restricted to that folder
    • Once you created the field, click to view the source code and insert <div class="image-chooser"> </div> around the <select....></select> item for image, so your final code looks like this: <div class="image-chooser"><select model="items;filterID=1046205" name="image" title="Image" validation="type:string"></select></div>
    • Save the authoring form

    I hope this helps. Let me know if any of these steps are not very clear.

    Hi Elizabeth: I followed the instructions. It let me load the photo. However when you preview the page the text animal image shows up. Here is a link to the page: http://tmmc.pub30.convio.net/education/marine-mammal-information/pinnipeds/harbor-seal.html. Thanks.

  • Dana Bialashewski:

    Hi Elizabeth: I followed the instructions. It let me load the photo. However when you preview the page the text animal image shows up. Here is a link to the page: http://tmmc.pub30.convio.net/education/marine-mammal-information/pinnipeds/harbor-seal.html. Thanks.

    Dana,

    To display the image selected via a chooser field requires special coding with a templating language. If you just drop in the field via editor then you just get a name or a link.

    To display images from a chooser field you need to use <t:list> syntax.

    For example if the name of your field is image the syntax would be:

    <t:list id="image"><img src="${url}" alt="${title}" /></t:list>

    Also be sure you enter this syntax in source mode of the template as Wysiwyg 1.0 editor can mess it up.

    Refer to the Display Template Reference Guide for more detailed instructions on how to code templates.

Categories