Forums / Setup & design / Showing Links of Restricted Pages

Showing Links of Restricted Pages

Author Message

John Smith

Friday 31 July 2009 1:48:07 am

Hi Guys,

Hope get some help from here. I am building a site with two level menu. The first level of menu for a site is always accessible to the all the users. But the second level menu is only acccessible when the members are logged in.... The problem is, I also want to show the links for the second level for the anomoyous users.

Is there any best way to achieve this? Hopefully will not be disappointed.

Cheers,

Ivo Lukac

Friday 31 July 2009 2:20:03 am

You need to find the fetch function for second level (in top menu template) and add parameter which will disable policy checking:

limitation,array(),

check http://ez.no/doc/ez_publish/technical_manual/4_0/reference/modules/content/fetch_functions/list for more details

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Marcel Marnet

Moderated by: Marcel Marnet

Friday 31 July 2009 2:59:50 am

'limitation', array( hash( 'Section', array( SECTION_IDS ) ))

the array includes the section-ids, which the user should get access for.

example for fetching news and articles on an ez system with more than 1 section:

{def $newslist=fetch('content','tree',
                       hash('parent_node_id',2,
                            'sort_by',array('published',false()),
                            'class_filter_type',  'include',
                            'class_filter_array', array('news','article'),
                            'limit',5,
                            'limitation', array( hash( 'Section', array( 1, 3, 6, 7, 8 ) )
                                               ) 
                            )
                     )
}

cubby cub

Tuesday 25 August 2009 6:07:31 am

hello,

what you're saying is you need to modify the original code correct? meaning that, this isn't a site/template specific issue. all users of this script who desire to show links of restricted pages will need to do the exact same thing. correct?

if that's the case, why not take an extra moment or two to add the code changes here in the forum? why not use the code tag to do the following...

1. the following works for ez_pub version a.b.c. look for public_html/ez_pub/in-some-directory/x.ext (the full path of the file).

2. find the following on/around line x

some original code 

3. change to

modified code that fixes the issue

-------

is this too much to ask?

i mean, apparently you all know how to fix this so if you know how to fix it, why don't you just post the solution rather than having people who may not be as savvy as you searching around.

i know what you're asking me to do and i'm sure that with a bit of hunting around i can find the file and add the fix. the thing is, if you already know what file i need to edit, why don't you share? is it a secret?

i just decided to hard code my top menu. it's not worth it to me to take the time AT THIS POINT to figure out which file contains functions

Aang: Just like the legend says, we let love lead the way.