Custom page with multiple project() calls

anton's Avatar

anton

10 Dec, 2013 10:25 PM

So I am trying to achieve a page that displays three different project grids. Its gonna be like an archive page of projects divided into different categories, with some text in between and probably anchors.

So I think the best way to go is to use the project() function and within it call the different section using tags or sections, specifying "section= work and show= small" as I've understood projectList() cant be used in this way from another thread.

But the problem - and I believe its super easy - is that I dont know where to start. If I make a normal page I cant enter php code in the content in the cms I believe? So I guess it needs to be hard coded some way - so how can I create a hard coded page that properly includes all the headers and functions? Or am I missing something?

First I thought I could achieve it with a custom html template and create a page with project as Type, and then use the template. But It seems that the templates only control how to format only the project list. I'd like to make a custom layout.

I hope that it's clear. And I'm sure that its quite easy to do as well!

Thank you!

  1. 1 Posted by anton on 11 Dec, 2013 11:13 AM

    anton's Avatar

    Oh never mind, I believe I solved it by putting all the code inside the layout_default and using if ( currentPage() == 'projects' )

    Please poke me if there's a better way of doing it :)

  2. Support Staff 2 Posted by Mikael on 28 Apr, 2014 04:26 PM

    Mikael's Avatar

    Late answer, sorry.

    But yes, the best way would be to put it into layout_default.php. layout_projects.php is the view that is shown when a project is selected. Default is for everything else.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac