cms selflink next/prev

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
firfelin

cms selflink next/prev

Post 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.
Last edited by firfelin on Fri Aug 03, 2007 3:11 pm, edited 1 time in total.
crisb

Re: cms selflink next/prev

Post by crisb »

i know this thread is pretty old ;-)
but i am experiencing the same problem right now. is there a hack for this?
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: cms selflink next/prev

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

Re: cms selflink next/prev

Post 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.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: cms selflink next/prev

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

Re: cms selflink next/prev

Post 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  :(
Last edited by crisb on Fri Sep 07, 2007 10:45 am, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: cms selflink next/prev

Post by RonnyK »

Crisb,

do you have a link?

Ronny
crisb

Re: cms selflink next/prev

Post by crisb »

i am sorry. no. it is just on my local machine right now.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: cms selflink next/prev

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

Re: cms selflink next/prev

Post 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.
Last edited by crisb on Fri Sep 07, 2007 12:04 pm, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: cms selflink next/prev

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

Re: cms selflink next/prev

Post by crisb »

great minds talk alike  ;D
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: cms selflink next/prev

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

Return to “CMSMS Core”