Page 1 of 1

Relational Links Problem

Posted: Wed Mar 05, 2008 10:27 am
by sonictrip
Hi, im trying to create a relational link between the 4th level pages in my content layout so in other words i want the link to work between the pages 2.1.2.1 to 2.1.2.4 and then go to 2.1.3.1 to 2.1.3.5.

Im using the tag {cms_selflink dir="anchor" text="Next Page"} which seems to be sending me from a product page at 2.1.2.1 to 2.1.3 instead of going to 2.1.2.2 which should be the next page.

So in English here's whats happening, my cataloger categories for that section are at 2.1.2 for "Contemporary" and 2.1.3 for "Modern", the relational links only seem to be linking these two main sections together instead of the products above them at 2.1.2.1 to 2.1.2.4

How do i limit the relational links to only go through the 4th level pages instead of jumping between the 3rd level sub categories?

Im using CMSMS v1.2.3 and Cataloger v0.6.2, thanks!

UPDATE: The pages which i wanted the links to go to were not active on the menu (which is the way it needs to be) but i notice that when i select the checkbox "Show in menu" the relational links do work the way i want them to. So now, how do i make the pages (with show in menu set to no) appear next in the relational links? Is there also some default amount of category levels which needs to be changed from "3" to "4"? Think i may have seen that somewhere...

Re: Relational Links Problem

Posted: Mon Mar 31, 2008 1:53 pm
by sonictrip
Can someone please just tell me what the available parameters are for using the CMS_SELFLINK function? I need to know how to display the pages in "tier 4" with previous and next buttons but it only seems to work with tier 3 unless "Show in menu" is enabled in the page options itself.
I cant use "show in menu" though coz the client doesnt want the actual product pages showing in the main menu's but they definitely want to use relational links between product pages... How do i accomplish this???

Thanks.

Re: Relational Links Problem

Posted: Mon Mar 31, 2008 4:43 pm
by sonictrip
Ok, i found the list of parameters but im still not able to get this working the way we need it...

Here's how the pages are laid out:

1.  Home (Shown in Menu)

2.  Kitchens (Shown in Menu)

2.1  Our Range (Shown in Menu)

2.1.1  Contemporary (Shown in Menu)
2.1.1.1  Product 1 (Not Shown in Menu)
2.1.1.2  Product 2 (Not Shown in Menu)
2.1.1.3  Product 3 (Not Shown in Menu)
2.1.1.4  Product 4 (Not Shown in Menu)

2.1.2  Modern (Shown in Menu)
2.1.2.1  Product 1 (Not Shown in Menu)
2.1.2.2  Product 2 (Not Shown in Menu)
2.1.2.3  Product 3 (Not Shown in Menu)
2.1.2.4  Product 4 (Not Shown in Menu)

2.1.3  Classic (Shown in Menu)
2.1.3.1  Product 1 (Not Shown in Menu)
2.1.3.2  Product 2 (Not Shown in Menu)
2.1.3.3  Product 3 (Not Shown in Menu)
2.1.3.4  Product 4 (Not Shown in Menu)

The above is just some of the menu... When i use the relational links or pagination or whatever its called on the product page cataloger template, it only puts "Next" and "Previous" links between the pages "Contemporary", "Modern" and "Classic".

When all product pages have their options set to "Show in Menu" it all works without any problems! Next page after "Contemporary" is "Product 1", then "Product 2" and so on, exactly the way we want it...

So, my question is this, what Parameter do i use and can you give me an example please, in order to ge the relational links working in between pages which have "Show in Menu" unticked??? Is this even possible? Surely changing some PHP script somewhere could enable relational links between pages that are not "Shown in Menu"? Has to be an option somewhere that lets the relational links work between ALL pages and not just pages that have "Show in Menu" ticked?

I actually cant believe nobody knows the answer to this question, ive been searching for a fix for this for the last month and a half... Thanks to anyone that can solve this bad boy...

Re: Relational Links Problem

Posted: Tue Apr 01, 2008 9:18 am
by Richardo P
Hi,

could you solve this by using some of the paramaters in menu manager instead?  For example:

1. {menu number_of_levels="3"} (only show pages up to 3 levels deep in the menu)

or

2. {menu excludeprefix="alias1,alias2,alias3"} (not as good, so i really wouldnt bother with this one)

option 1 will then allow you to have all your pages set to 'show in menu' and they still wont show in the menu, this should then allow your prev/next links to work as you intend in the cataloguer template.

If limiting menu manager to 3 levels of navigation is going to cause problems with other areas of your site that have more than 3 levels (you should ideally try to limit a site to 3 levels anyway imo, but I've found this hard in the past) you could use different menu manager calls in the page template dependant on  the root alias, for example:

{if $cgsimple->get_root_alias() =='kitchens'} (use correct page alias)
    {menu number_of_levels="3"}
{else}
    {menu}
{/if}

This checks the root alias, if it is 'kitchens' it uses  {menu number_of_levels="3"} if it is not it uses {menu}.  For this to work you will need to download and install the CGSimple Smarty  module via module manager if it is not already.

Hope this helps.

Richard

Re: Relational Links Problem

Posted: Tue Apr 01, 2008 11:01 am
by sonictrip
Richardo, you are a legend! That is working perfectly! Thank you very much! :D

Only thing left to do is style the "Previous" and "Next" links. I see inside {cms_selflink class="h4"} styling the class is possible but how do style the actual "Next Page" and "Previous Page" text?
In cataloger, the cms_selflink tag is insided a DIV tag with class "item" but changing the "item" class in the stylesheet doesnt seem to do anything so i've tried DIV#item, DIV#item td and a couple of others but it doesnt seem to be changing.
Any ideas how to style those bits of text?

Thanks a million for solving the menu/pagination problem, that took so long to find a solution, much appreciated! :)

Re: Relational Links Problem

Posted: Tue Apr 01, 2008 12:32 pm
by Richardo P
without seeing your site its difficult to say the best way to do this but heres one (almost)fail safe way:

Wrap the {cms_selflink} in something with a  specific class, Something like


      {cms_selflink}


Then in your css you need to style 'a' and its variants when its inside the class self link, something like:

.selflink a {STYLE INFO}

hope this helps

Re: Relational Links Problem

Posted: Tue Apr 01, 2008 5:07 pm
by sonictrip
Amazingly enough, no class references seem to work when i try to apply them to the "Next Page" and "Previous Page" text whether i try or even if i use a , didnt want to try coz that would just mess up my layout, its very tight where those links are...

Then with the selflink link i had to disable the text using {cms_selflink dir="previous" lang="0"} and use a span to style the "Previous" and "Next" text harcoded just to the left of {cms_selflink}

So, the only bit of code that worked was:

Code: Select all

<span style="color:#567784;font-family:Verdana, Arial, Helvetica, sans-serif;font-size: 10px;" class="tiletext">
Here's how the whole thing looks:

Code: Select all

 <td width="50%" align="left"><span style="color:#567784;font-family:Verdana, Arial, Helvetica, sans-serif;font-size: 10px;" class="tiletext">Previous: {cms_selflink dir="previous" lang="0"}</span></td>

Re: Relational Links Problem

Posted: Wed Apr 02, 2008 10:55 am
by Richardo P
glad you got it working

Re: Relational Links Problem

Posted: Wed Apr 02, 2008 12:01 pm
by sonictrip
Thanks for the help Richardo!  ;D

Re: Relational Links Problem

Posted: Sun Apr 06, 2008 5:07 am
by Dr.CSS
[solved] ?...

Re: Relational Links Problem

Posted: Mon Jul 06, 2009 3:07 pm
by tkemmere
Indeed the prev-next-up selflinks depend on "show in menu" being on.
This is a problem.

But as far as I'm concerned this is SOLVED. Not propperly, but workable.

Richardo P came with the number_of_levels="3" addition to the menu tag, and it did the job for me! All I had to do was to harmonize my site so all categories would go 3 levels deep, but that was no problem.

Thanks to Richardo P. Thomas.