order objects like i want? gna

Author Message

Yvan Cottyn

Wednesday 01 October 2003 2:54:06 am

Let's say that in folder XYZ i have 10 objects: A, B, C, D, E, F, G, H, I and J.
When looking at the folder (full view folder + list of children in line view) i want to see the children listed in following order: C, D, G, A, F, E, B, I, H, J.
This is not a logical order, not by pub/mod time, name, ..... but it is the order that i want. How do i fix that? What sort_by array do i feed to my fetch?

BTW, how do i set an object's priority and can i use sort by priority here?

TIA
Vanne

Paul Forsyth

Wednesday 01 October 2003 3:49:50 am

Do you want to sort in the template or in the admin interface?

For the admin interface you need to set the sort order for the folder itself. Once you have done this refresh the contents of the folder and you will see your sort happen.

For template sorting look here:

http://ez.no/content/view/full/29404

Paul

Yvan Cottyn

Wednesday 01 October 2003 5:51:14 am

thx for your reply but it does not answer my questions....
not the sorting question, not the priority thingy question....

Paul Forsyth

Wednesday 01 October 2003 7:43:02 am

You need to be more explicit with your questions and answer the questions asked of you.

I assume you are speaking about the admin? If you are in the admin edit the folder object you are interested in. In the edit view there is a drop-down box named 'Sort By'. You can select what order you wish there.

Paul

Mark Scarbrough

Wednesday 01 October 2003 12:57:23 pm

RE: BTW, how do i set an object's priority and can i use sort by priority here?

Yes, it sounds like the only way to get the custom sort order you want is to use priority sorting. As mentioned in previous posts, edit the parent object and set the sort order to 'priority'. Now navigate so that you are viewing (not editing) the parent object in the admin interface. You will see a list of the child objects in a table below the default view of the parent object. A user editable field of the table is labeled "priority". Type in the custom order in which you would like the objects to appear and then press the "update" button. It sounds complicated but it is easy after you do it once.

Now, the sort array to use in your in your template file:
To explicitly sort by priority: array('priority',true())
To respect the sort order set in the admin interface (which will be 'priority' if you follow the instructions above): $node.sort_array

Hope this helps,
Mark

Yvan Cottyn

Thursday 02 October 2003 6:37:45 am

okay,
i understand there is only a short fixed list of sorting criteria possible.
i also know how to change that for some object.
i understand that the 'priority' sorting option is the only one that can help me
to see my (child)objects listed in my custom order.

what i do not seem to find is how to set the priority for a certain (child)object.
can someone explain me how to do this:
in the root folder i have five other folders, nothing more. i want to set their priority value. how to?
it must be so simple i don't see it or something..

what's with the admin vs not admin thing? it's both template driven? i can overload them both, right?

blah
vanne

Mark Scarbrough

Thursday 02 October 2003 7:20:53 am

I tried to be as clear as possible in my previous post, and I would encourage you to follow it step by step:

1. Edit the root folder and set the "sort order" to priority.
2. Press "send for publishing".
3. You are probably now viewing (not editing!) the root folder in the admin interface. The child objects you wish to sort are listed on the screen below the default view of the root folder.
4. Take a close look at this list. Each object has a "priority" number which is user editable. Simply change the numbers to the order they should appear in and press "update".

Note, the priority number is not set when you edit an object, it is set from the list view. Also, the priority numbers do not appear unless you actually set the PARENT object sort order to priority.

Yvan Cottyn

Thursday 02 October 2003 8:35:16 am

aha, les voila!
i could kiss you :) gna

the problem was that i was looking to set priority values before setting the sort_by value of the parent node to 'priority' first... pffff

thx again

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 21:01:33
Script start
Timing: Jan 18 2025 21:01:33
Module start 'layout'
Timing: Jan 18 2025 21:01:33
Module start 'content'
Timing: Jan 18 2025 21:01:34
Module end 'content'
Timing: Jan 18 2025 21:01:34
Script end

Main resources:

Total runtime1.1097 sec
Peak memory usage4,096.0000 KB
Database Queries74

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 587.9141152.6250
Module start 'layout' 0.00630.0035 740.539139.4453
Module start 'content' 0.00981.0983 779.9844569.2969
Module end 'content' 1.10800.0016 1,349.281316.1641
Script end 1.1096  1,365.4453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.3051160.0002
Check MTime0.00130.1190160.0001
Mysql Total
Database connection0.00130.112610.0013
Mysqli_queries1.046394.2905740.0141
Looping result0.00070.0671720.0000
Template Total1.070996.520.5355
Template load0.00210.184820.0010
Template processing1.068996.321420.5344
Template load and register function0.00020.016410.0002
states
state_id_array0.00120.104810.0012
state_identifier_array0.00220.196020.0011
Override
Cache load0.00180.1584550.0000
Sytem overhead
Fetch class attribute can translate value0.00050.047930.0002
Fetch class attribute name0.00150.139280.0002
XML
Image XML parsing0.00030.029230.0001
class_abstraction
Instantiating content class attribute0.00000.001880.0000
General
dbfile0.00160.1477100.0002
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
14content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 34
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs