Share » Forums » Setup & design » Trouble Displaying Class Attributes...

Trouble Displaying Class Attributes From A Fetch

Trouble Displaying Class Attributes From A Fetch

Friday 06 February 2004 4:42:27 pm - 2 replies

Author Message

Marco Zinn

Saturday 07 February 2004 2:56:00 am

Hi, did i understand correctly?
You inserted a new attribute (chapter) into the folder class and want to print the content of that attribute in the folder list (Table of contents)?

You have some bugs in your template code.
First, the <ul> should be before the section beginning. Or you will get multiple ul's, but just one /ul and this is not valid HTML

Your main problem: When you want to access the "chapter" data, you should use $category.item.object.data_map.chapter (or $category.item.data_map.chapter, i never remember).

You try to use category_list, which will give you access to the LIST (or array), but you need the individual (current) item.
Search the documentation for "data_map" for more info.
$category.item.object.data_map.chapter will give you access to the attribute, but you probably cannot print this directly. If it's a simple attribute type (textline), then you can try $category.item.object.data_map.chapter.output. If not, use attribute_view_gui. Again, search the docu for "data_map" and "attribute_view_gui" for more detailled info.

Marco
http://www.hyperroad-design.com

Clay Pereira

Saturday 07 February 2004 4:02:30 pm

Thank you Marco for getting me on the right track.I used the following and it works.
{attribute_view_gui attribute=$category.item.object.data_map.chapter}

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu