Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Menu ordering
#1
Hi Getsimplers :-),

i'm new to this CMS and after playing a while with release 2.x i take a look
to 3.x... i really like this little toy ;-), but i'm my opinion the way the page's
priorities are handled is a bit awkward.
For example, if i have:

index, priority -
page_1, priority 2
page_1_1, priority 3 [parent: page_1]
page_2, priority 4
[...]

shouldn't be better to have something like:

index, priority -
page_1, priority 1
page_1_1, priority 1 [parent: page_1]
page_2, priority 2
[...]

where page_1_1 priority is handled as "1.1" because it's a child
node.
What i'm saying is: isn't be better to have a hierarchical structure
over a simple priority way that mixed the menu ordering (especially
when you want a multilevel navigation)?
Another thing: what if i've got more than 20 items to order (e.g. 30
galleries, each one that has its own page)?
I know that I18n plugin tries to do something like that, but i think it
relies on the present priority numbering and not in a pure hierarchical
way.
Am i worng?


Cheers and great work guys ;-),
ff0000.it
Reply
#2
ff0000.it Wrote:I know that I18n plugin tries to do something like that, but i think it
relies on the present priority numbering and not in a pure hierarchical
way.
Am i worng?

The I18N plugin uses the priority (which you don't see any more with its improved GUI) to order the pages with the same parent (and it doesn't matter, if these priorities are 1, 2, 3 or 4, 20, 35) - as soon as you save they will be 1, 2, 3, ... per parent.

It's newest version even allows you to order the pages with drag-and-drop.

And of course it provides the functions for - near perfect ;-) - multi-level naviation.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#3
Hi mvlcek,

isn't relying on a "global" priority numbering too bad? What i mean is shouldn't be a better
(and logical) solution to have a tree ordering solution (on which you could recurse with ease)?

I wrote a crappy piece of code that basically does what your plugin does plus some (incomplete)
ideas i have for generating XHTML menu suitable to those you could find on http://cssplay.co.uk/.
Accidentally i came to I18n plugin and i discover the "hidden" hierarchical navigation feature, so
i decided to use it untill i have some free time to play with my code (and learning a bit more about
getsimple's plugin system :-P).

By the way i think that your "hack" with priority numbering isn't the cleanest solution, but it's
true that i don't try your newest release and if the drag'n'drop feature reevaluates the priorities,
then i enjoy it for sure! ;-)


Keep at it! :-)
ff0000.it
Reply
#4
ff0000.it Wrote:isn't relying on a "global" priority numbering too bad?

As I have explained, the priority only sorts sibling pages (those with the same parent).
And unless you want to sort by natural order (e.g. by name or id) you need a number.

ff0000.it Wrote:What i mean is shouldn't be a better
(and logical) solution to have a tree ordering solution (on which you could recurse with ease)?

I don't understand, what you mean.


ff0000.it Wrote:By the way i think that your "hack" with priority numbering isn't the cleanest solution

See above.

ff0000.it Wrote:Keep at it! :-)
ff0000.it

I will, thanks.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#5
mvlcek Wrote:As I have explained, the priority only sorts sibling pages (those with the same parent).
And unless you want to sort by natural order (e.g. by name or id) you need a number.
Ok, but forget about your implementation and take a look how getsimple hadles pages'
ordering:

* index | priority - | parent -
* page-1 | priority 1 | parent -
* page-1.1 | priority 1 | parent page-1
* page-1.2 | priority 2 | parent page-1
* page-1.3 | priority 3 | parent page-1
* page-2 | priority 2 | parent -
* page-2.1 | priority 1 | parent page-2
* page-3 | priority 3 | parent -

if you insert pages like above, the menu generated by getsimple isn't ordered as i
expected, it comes out like:

* index
* page-1
* page-2.1
* page-1.1
* page-1.2
* page-2
* page-1.3
* page-3

based on that result i think the _current_ implementation of pages' ordering is bad,
not on what your plugin does, because your plugin follows (or try to ease the messy
priority thing) a classic tree ordering while getsimple loads all the pages and orders
them by the priority without paying attention to the parents.

mvlcek Wrote:
ff0000.it Wrote:By the way i think that your "hack" with priority numbering isn't the
cleanest solution
See above.
solution

Is it more clear what i'm trying to say with my primordial english? :-)))
I don't say your solution is bad, on the contrary it's a right way to do the right thing
out of the mess i see with priority ;-)
Priority goes well if you plan to have single level menu, but it sucks on multilevel ones.


Cheers,
ff0000.it
Reply




Users browsing this thread: 1 Guest(s)