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

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
blackrain
Forum Members
Forum Members
Posts: 98
Joined: Wed Feb 20, 2008 4:33 pm

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

Post 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
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1800
Joined: Wed Feb 25, 2009 4:25 am

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

Post by DIGI3 »

You may be able to save some steps by using CGSimpleSmarty's get_parallel_page function.
Not getting the answer you need? CMSMS support options
blackrain
Forum Members
Forum Members
Posts: 98
Joined: Wed Feb 20, 2008 4:33 pm

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

Post 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
Locked

Return to “CMSMS Core”