Accessing elements of another page

Hello everyone,
I am stuck with a query here kindly help me rectify it. I am trying to access the contents of customer page(content type) in the marks page(content type). Both the content types are created by me in my own add-on. I have attached the diagram of the scenario.

Here is the code snippent:

/browser/configure.xml:
-----------------------
  <browser:page
    name="customerview"
    for="*"
    class=".customers.CustomersView"
    template="templates/customerview.pt"
    permission="zope2.View"
  />
 <!--Mark Template-->
  <browser:page
    name="markview"
    for="*"
    class=".mark.MarksView"
    template="templates/markview.pt"
    permission="zope2.View"
  />

The python class files:

#CustomerView
from Products.Five.browser import BrowserView
from plone.dexterity.browser.view import DefaultView
from plone import api
class CustomersView(DefaultView):
	"""Customer Browser view"""

#MarksView
from Products.Five.browser import BrowserView
from plone.dexterity.browser.view import DefaultView
from plone import api
class MArksView(DefaultView):
	"""Marks Browser view"""

If I understood you correct:

A query should be enough

from plone import api
customer = api.content.find(context=api.portal.get(), portal_type='customer')

And now you have all your customers in an list of brains.

Links:

I am having multiple customers that's the problem. Sorry for the diagram . Kindly check this one.

If you know the wanted Item, search for a particular Item-ID, or if you want a more flexible way you have to "link" both Content-Types..

See this:

will this work if I have multiple Marks

If you work with relations - yes, than you select your (related) customer per "Mark" Item.
If you work with a hardcoded catalog-search with an given id - no, all your "Mark" Items will show the same (id) item.

Thank you . I need to do it programatically. Can anyone help me with it. It will be helpful If you redirect me to the sample code or page

Tutorial:

A good working example

Have fun :slight_smile: