[solved]CGSimpleSmarty and get_sibling

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
Jean le Chauve

[solved]CGSimpleSmarty and get_sibling

Post by Jean le Chauve »

get_sibling($direction[,$assign][,$alias])
Returns the alias of the next or previous sibling to the specified page. or false.
1.11 svn 8215
CGExtension 1.30
CGSimpleSmarty 1.5.2
url_rewrite on

{$cgsimple->get_sibling("next","next_sibling")}{$next_sibling} return the alias in the same hierarchy, so :
parent1 gives alias of parent2, not the alias of his first child
Child 1.1 gives alias of 1.2 and "false" for the last child 1.

Bug or it is a mistake in help or I did not quite understood the meaning of sibling ?
Last edited by Jean le Chauve on Mon Aug 06, 2012 9:08 pm, edited 2 times in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: CGSimpleSmarty and get_sibling

Post by calguy1000 »

sibling == 'brother or sister'.

so given a hierarchy like this:

1 parent_1
1.1 child_a
1.2 child_b
2 parent_2
2.1 child_c
2.2 child_d
2.3 child_e

$cgsimple->get_sibling(-1,'child_d'); should return 'child_c'
$cgsimple->get_sibling(1,'child_d'); should return 'child_e'
$cgsimple->get_sibling(-1,'parent_2'); should return 'parent_1';
$cgsimple->get_sibling(,'parent_2'); should return nothing... because there is no next sibling.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Jean le Chauve

Re: CGSimpleSmarty and get_sibling

Post by Jean le Chauve »

Thank you for the explanation and sorry to have lost time
Locked

Return to “Modules/Add-Ons”