Creating custom page types?

19 views
Skip to first unread message

krillzip

unread,
Jul 22, 2011, 6:26:27 PM7/22/11
to phundament-dev
Hello!

I have just started to evaluate Phundament 2.1
I am building a site that will look like a directory for freeware.
First I thought about doing the normal Yii way, designing models and
generate CRUD. But thought maybe the pages in Phundament can be
customized with extra fields. That would probably be practical to use
and then list categories and so on.

Is there any support in Phundament to create/register new page types?
(have seen the blog type)
Any hints/tips/tricks.

I am quite new too phundament but start to grasp the concept. Not very
much information/documentation.

Regards
Kristoffer Paulsson

schmunk

unread,
Jul 24, 2011, 5:12:55 PM7/24/11
to phundam...@googlegroups.com
Hi Kristoffer,

Am 23.07.2011 um 00:26 schrieb krillzip:

> Hello!
>
> I have just started to evaluate Phundament 2.1
> I am building a site that will look like a directory for freeware.
> First I thought about doing the normal Yii way, designing models and
> generate CRUD. But thought maybe the pages in Phundament can be
> customized with extra fields. That would probably be practical to use
> and then list categories and so on.

Take a look at config/module.php, you'll find many options there.

You can add any type you want to the core models page, html and file.

For P2Html there are already types in the config:

/* info (meta data) */
'p2.info.types' => array(
// types for HTML
'P2Html' => array(
'blog'=>'Blog/News',
'mobile'=>'Mobile'), // type: unknow will be always available

/* add types for pages like this */
'P2Page' => array(
'a'=>'Type A',
'b'=>'Type B'), // type: unknow will be always available

),


>
> Is there any support in Phundament to create/register new page types?
> (have seen the blog type)
> Any hints/tips/tricks.

You can also register new views and layouts:

/* pages */
'p2.page.availableLayouts' => array(
'cms' => 'CMS'
),
'p2.page.availableViews' =>array(
'/cms/default' => 'Default',
'/cms/simple' => 'Simple',
),


>
> I am quite new too phundament but start to grasp the concept. Not very
> much information/documentation.

Yeah I know ... sorry about that.

Does this solve your problem?


Best regards,
schmunk

>
> Regards
> Kristoffer Paulsson

Reply all
Reply to author
Forward
0 new messages