Page 1 of 1

Try to find out how to get hierarchy position (1.2.3)

Posted: Thu Jul 25, 2019 11:45 am
by blackrain
I am trying to get the hierachical position of pages so that I can jump from one language page to another.

I have bee using the Goran post here: https://www.i-do-this.com/blog/Another- ... MS-Page/57 to get this to work. However the code is for version 1.1x.x of CMSMS and I cannot find anything that relates to hierarchy for version 2.2.10.

I figured out '$friendly_position' is no longer available but neither is '$position', am i missing something here.

Partial of template code below:

Code: Select all

{capture assign="hierarchy_us"}2{$friendly_position|substr:'1'}{/capture}
{capture assign="hierarchy_en"}3{$friendly_position|substr:'1'}{/capture}
{capture assign="hierarchy_de"}4{$friendly_position|substr:'1'}{/capture}
{capture assign="hierarchy_fr"}5{$friendly_position|substr:'1'}{/capture}
{hierarchy_position friendly_position=$hierarchy_us assign="us_alias"}
{hierarchy_position friendly_position=$hierarchy_en assign="en_alias"}
{hierarchy_position friendly_position=$hierarchy_de assign="de_alias"}
{hierarchy_position friendly_position=$hierarchy_fr assign="fr_alias"}
If someone can point me in the right direction it would be very much appriciated

Mark

Re: Try to find out how to get hierarchy position (1.2.3)

Posted: Fri Jul 26, 2019 4:00 pm
by DIGI3
You may be able to save some steps by using CGSimpleSmarty's get_parallel_page function.

Re: Try to find out how to get hierarchy position (1.2.3)

Posted: Wed Jul 31, 2019 9:02 am
by blackrain
DIGI3 wrote:You may be able to save some steps by using CGSimpleSmarty's get_parallel_page function.
fabulous suggestion, works like a dream and cuts down on so much code also. Many thanks ;D