Page 1 of 1

cms selflink next/prev

Posted: Wed Jun 13, 2007 10:51 am
by firfelin
Hi,

I have some troubles with the cms selflink next/prev

I would like to put some arrows to go from one page to the previous/next, it almost works, unless it seems to see only the first hierarchical level of pages: when I am on the page 2.1, it skip to the 3 instead of the 2.2


Thanks again in advance for your help.

Re: cms selflink next/prev

Posted: Wed Sep 05, 2007 1:31 pm
by crisb
i know this thread is pretty old ;-)
but i am experiencing the same problem right now. is there a hack for this?

Re: cms selflink next/prev

Posted: Wed Sep 05, 2007 1:42 pm
by RonnyK
Crisb,

I just checked, on

http://demo.krijt.eu/index.php?page=level2

and there the next/prev is pointing to the same level "level22" is as deep as level2.

What version of CMSMS are you using?

Ronny

Re: cms selflink next/prev

Posted: Fri Sep 07, 2007 8:27 am
by crisb
right now i am using the last version of cmsms. (1.1.1)

and to be more precise ... :)
the structure looks like this:
mainpage 1
---subpage1
---subpage2
mainpage2

i am using this tag on subpage 1:
{cms_selflink dir='next' lang="0" image="uploads/images/arrow_right.gif" imageonly=1}

and the link redirects to mainpage2 instead of subpage2.

Re: cms selflink next/prev

Posted: Fri Sep 07, 2007 8:33 am
by RonnyK
Crisb,

there is a new version out, 1.1.2. Check the download-menu on top.

Do you have a link, to see/

What happens if you just use the basic-calling

Code: Select all

{cms_selflink dir="next"}
Ronny

Re: cms selflink next/prev

Posted: Fri Sep 07, 2007 8:43 am
by crisb
oh, thought that 1.1.1 was the latest because 1.1.2 isnt announced in the main section.

used the {cms_selflink dir="next"} - tag, and it also links to the next mainpage.

EDIT
i just updated to 1.1.2. the problem stays the sameĀ  :(

Re: cms selflink next/prev

Posted: Fri Sep 07, 2007 10:48 am
by RonnyK
Crisb,

do you have a link?

Ronny

Re: cms selflink next/prev

Posted: Fri Sep 07, 2007 11:24 am
by crisb
i am sorry. no. it is just on my local machine right now.

Re: cms selflink next/prev

Posted: Fri Sep 07, 2007 11:36 am
by RonnyK
Can you check the source (while viewing the site!), if the numbering is consistent with what you expect. Is it 1, 1.1, 1.2, 2 indeed, or is 1.2 misnumbered. If so, use the re-order pages, to reset the numbering.

Is there something specific with the page you're not seeing? Type/not shown in menu/not active/content-alias used?

Ronny

Re: cms selflink next/prev

Posted: Fri Sep 07, 2007 11:39 am
by crisb
special about the sites ist that they are all set to "dont show in menu".
i guess that is reason for it.

EDIT
i just checked it with submenu pages that are not set to "dont show in menu". and there it works.
so the question is, if there is a hack for my situation :-)

found that in the changelog of cmsms:
"Fixed cms_selflink so next/previous links respect the show in menu flag"

i guess this is exactly what i dont want it to do ;-)

EDIT 2
now that is one dirtyhack, but it works.
in the function.cms_selflink.php file i just changed the following

Code: Select all

if ($content->Active() && $content->ShowInMenu() && $content->HasUsableLink())
to

Code: Select all

if ($content->Active() && $content->HasUsableLink())
perhaps i will write a extra parameter for the cms_selflink tag. guess that will do it.
thanks for tipping me off ronnyk.

Re: cms selflink next/prev

Posted: Fri Sep 07, 2007 12:00 pm
by RonnyK
What about modifying the tag yourself,

the logic mentions:
&& $content->ShowInMenu()
When you delete those entries in the tag, it should show, even if they are "not shown in menu".

Ronny

Re: cms selflink next/prev

Posted: Fri Sep 07, 2007 12:05 pm
by crisb
great minds talk alikeĀ  ;D

Re: cms selflink next/prev

Posted: Fri Sep 07, 2007 12:11 pm
by RonnyK
To play it completely safe for future upgrades, you could copy the tag to f.e. crisb_selflink and find/replace all cms_selflink-references to that name and modifying the mentioned code.

That way your tag will never e overwritten, by upgrades.

Ronny