Directory Sorting / Costum Views and Lists

More
14 years 3 months ago #2877 by flinz
Hi everybody,

I'm fairly new to flexi/joomla and have a basic problem:

I need to generate views of my content (grouped by category and a full list). right now I can accomplish this via the directory view, but as soon as I get to the listing of the actual items, I have them ordered by the title field, which is the only one displayed.

I need a list ordered not by the "title" field, but by one of my custom fields, it's "last name" actually.
also i'd like to change the way my content is displayed in lists, meaning NOT displaying the title field, but some custom fields, maybe defined by some custom template.

Any thoughts on how to accomplish this easily?
I would be very thankful for help.

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #2949 by flinz
Well i figured out I should be able to set the sorting by setting it in the item-title tab ( www.flexicontent.org/documentati ... views.html ) but although I choose my costum field types to be searchable advanced searchable and filterable, they don't show up as a filterable column in my item-title overview.

How can I sort by custom fields columns?

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #2997 by jonnyeol
I'm stuck on exactly the same thing. Here's my site:

www.terminateshere.co.uk/index.p ... &Itemid=21

Preferably, I'd like to sort by column headings, like you could in the regular Joomla category lists. Failing that, I'd like to be able to find SOME way of sorting by Artist, rather than by Item Title.

Is this even possible to achieve? I've searched through the forums and not found a workable solution, so this seems to be a common problem.

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #2998 by flinz
Apparently it has been mentioned www.flexicontent.org/forum/index.php?f=2...rb_v=viewtopic#p2951 that TEXT costum fields are not filterable (and as far as i understand it, not orderable) as of beta 5.

I opened a feature request ( joomlacode.org/gf/project/flexic ... m_id=19510 ) as this is imho one of the key features missing in flexicontent:
being able to generate (directory) listings and category views with custom ordering.

You could create a custom template and therein reorder the rows you get by php before display. this would be an easy workaround, not digging to deep into the flexicontent structure - yet a direct sql query ordering would be a nicer way of doing this.

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #3000 by jonnyeol
I'd back up that feature request to the hilt if I knew how. I've spent the last 24 hours on FlexiContent and have managed to do everything I want it to, without resorting to help, until this!

In the meantime, where in the template php code should I look. Somewhere around line 87 for categories.php in the default template possibly? It's been over 4 years since I last coded php in anger!

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #3001 by flinz
first of all, in the flexicontent-templates thing, you have to assign your custom field to the template in the category-template section (the left one). Then make sure your items are using that template, as are the categories you are using.

then check the file templates/templatename/category-items.php which displays the list of items for a certain category (which is what i wanted to do).

you'll be able to access $this->items which is (I can't run it right now, so i'm guessing roughly) an array of your items. now, reorder this array by using the values of your field of choice (I'd go for an assciative array here, to do the sorting, e.g. www.phpf1.com/tutorial/php-sort- ... tml?page=4 , but there probably are easier ways..).

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.279 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline