Share » Forums » Setup & design » Related nodes & keywords for multi...

Related nodes & keywords for multi claesses ?

Related nodes & keywords for multi claesses ?

Wednesday 21 May 2008 2:53:05 pm - 3 replies

Author Message

Ɓukasz Serwatka

Wednesday 21 May 2008 11:14:56 pm

Hi,

As fare as I remember this is correct behaviour. keyword based relations are made between objects of the same content class. You can use dedicated to relations datatypes.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Marvix Marx

Thursday 22 May 2008 4:05:00 am

Hi,

sorry, but do you mean with "You can use dedicated to relations datatypes" ?

to add the related obj one by one ?

can this be fixed ?

There is article class and article_multipage class, you cann`t ignore one of them in the related ..

Marvix Marx

Thursday 22 May 2008 2:52:37 pm

OK, I wrote this code and its work fine for me, maybe some need it or can give better code!

<div>
{let RelatedKeywordArray=$node.object.data_map.keywords.content.keywords i=0}
     {foreach $RelatedKeywordArray as $RelatedKeyword}
    
    {def $kwlist=fetch(content,keyword, hash('alphabet', $RelatedKeyword, classid, array( '16' , '17'), limit, 5  ))}    	    	
    {foreach $kwlist as $RelatedNode}
        	
            {if $RelatedNode.keyword}
                {if ne($RelatedNode.link_object.node_id, $node.node_id)}
                	
                    {set $i=inc( $i )}
                    {if eq($i,1)}<ul>{/if}
                        <li><p><a href={$RelatedNode.link_object.url_alias|ezurl} title="{$RelatedNode.keyword}">{$RelatedNode.link_object.name}</a></p></li>
                    {if $i|eq(count($RelatedNode))}</ul>{/if}
				{/if}

            {/if}
     {/foreach}
    
    {undef $kwlist}
	{/foreach}
  {/let}  
  </div>

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu