Jump to content

Recommended Posts

Posted

Guests can not see page content. But users can.

 

Guest window:

Capture.PNG.2c91d2fb7365875457c2c4d17be1489a.PNG

 

User /Admin Window

 

Capture2.PNG.cf58374e5016381c1eb0508cf4a04a17.PNG

 

And this is my template file:

	   <h3> <?php echo "$page->title Konusunda özlüsözler"; ?> </h3> 
 
<?php 
  
$kisiler= $pages->find("template=kisi,sort=title,repeater_ozlusoz=[ozlusoz_konusu=$page->id]");
$n=1;

foreach ($kisiler as $kisi) {
	
	foreach($kisi->repeater_ozlusoz as $aforism) {

	$tags = '';

		foreach ($aforism->ozlusoz_konusu as $tag) { $tags .= '<a href="'.$tag->url.'">'.$tag->title.'</a>&nbsp; &nbsp;'; }
	if ($tag->id == $page->id) {
   echo '<p>'.$n.'. <a href="'. $kisi->url .'">'.$kisi->title.'</a> : "<i>'. $aforism->ozlusoz.'</i>"<br/>&nbsp; &nbsp; Etiketler: '.$tags.' </p>';
	$n=$n+1; }
	}
}

 

I  checked Template and Field Permisions.  Cache disabled.

Thank you for your help

 

 

 

Posted

Repeater items are stored under the admin tree in ProcessWire, thus they are only visible in find() calls for users with admin permissions. You can circumvent that by adding "check_access=0" to your selector.

  • Like 2
Posted

Thank you very much for your comment. I added it to my selectro. But stil it is not working.

$kisiler= $pages->find("template=kisi,sort=title,check_access=0,repeater_ozlusoz=[ozlusoz_konusu=$page->id]");

 

and my repeater access setup:

 

Capture.PNG.dae9cb46ffe4834ad91166b676d0381b.PNG

Posted

I solved finally.  check_access=0 must be in '[ ]' brackets.  

 

$kisiler= $pages->find("template=kisi,sort=title,repeater_ozlusoz=[ozlusoz_konusu=$page->id,check_access=0]");

 

  • Like 4

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...