Yesterday I created my first block module. This module shows a portfolio overview in the right sidebar. To display the right projectpages only, flexinodes need to be filtered (depending on the page's context). I'm wondering what is the best performing way to go. I'll explain.
On my site www.newoceans.nl/en-local I have the menu items and sections (using sections.module):
- webdesign
- graphic design
- multimedia presentations
To store project information as a kind of portfolio, I use flexinodes. The contenttype for these flexinodes is called a "projectpage". Each flexinode of type "projectpage" contains 18 flexinode fields.
As said before, in the right sidebar of my website I have a column "portfolio". In this column I want to show an overview of the projects, but then filtered: In the webdesign section I only want to show website projects, in the graphic design section I only want to show graphic projects, and in the multimedia presentations section I only want to show presentation projects.
Does anyone know what kind of solution will result in the best performance:
- Create one general block module, which will be used on pages of all three sections (block's path definition will contain three url aliases).
-> This is about a block that filters flexinodes by comparing the current page's section with the flexinode's section (if the current page's section is the same as the flexinode's section: show the projectpage in the sidebar, if the current page's section is not the same as the flexinode's section : do not show the projectpage in the sidebar)
- Create three specific block modules, which will be used on pages of one section only (block's path definition will contain one url alias).