assign default attributes from package

Permalink
Hello community,
I am trying to create a package that installs many things at once.
Never done this before and still getting my head arround C5, but loving it as well.
So I have a package that installs:
a few single pages
a few blocks
one theme
one page type
creates a set of atributes name ex(theme atributes)
creates atributes ex(page thumbnail)
All installs very well however i would like to assign the set of attributes created to the page type created and make then default for that page type.
Any ideas of how to do this?
Regards,
Paulo Carvalho

PauloCarvalhoDesign
 
ThemeGoodness replied on at Permalink Reply
ThemeGoodness
I may be misunderstanding your goal but if they install they should show up in the properties tab and if you want them to display you can put them in your page type. Or are you wanting something different?

Steph
PauloCarvalhoDesign replied on at Permalink Reply
PauloCarvalhoDesign
I Steph,

The attributes show properly, but i still need to assign them to a page type.
I am looking to make this assignment on package install so that the user wont need to.

For example this would allow to create a theme with many hardcoded blocks.
And the user would be able to turn thoose hardcoded block on by enable or desable an attribute.

So if there is a way to set this attributes as default for a page type all a user needs to do is when creating a new page with a specific page type he can then tick if he wants that specific functionality.

In the same way a user chooses EX(exclude from auto nav), a user would be able to choose EX(turn on built in features)
ThemeGoodness replied on at Permalink Reply
ThemeGoodness
ah I see, way beyond my skill set I am afraid. This seems more like add on packaging that is done for like say the blogs where the page itself automatically brings in specific things on the fly. If I am understanding this correctly.

Steph
PauloCarvalhoDesign replied on at Permalink Reply
PauloCarvalhoDesign
yes in a way,
imagine the following:

Theme for showcasing photographer portfolio.

One page type named project.
In that page type user will have as default the following attributes:

project thumbnail
project description
etc

When coding the page type you can hardcode thoose attributes and because when the user creates a page they would be available to choose,when done the new page whould display by default all that data.
ThemeGoodness replied on at Permalink Reply
ThemeGoodness
Hey did you figure this out? I am going to attempt it for something and I think I may have found a way just need to test it.

Steph
PauloCarvalhoDesign replied on at Permalink Reply
PauloCarvalhoDesign
Sorry not yet!
Regards
Paulo Carvalho
PauloCarvalhoDesign replied on at Permalink Reply
PauloCarvalhoDesign
Have you tested your code?
ThemeGoodness replied on at Permalink Reply
ThemeGoodness
Not yet I am playing at "domestic goddess today" (ie house cleaning) however tonight and tomorrow I will be working on c5 client work and themes so I will do that first and post what I find if it works. I am using attributes in my themes now going forward so having a way to make the special pages know what to load would be nice. Well load the right attributes to be filled out. I have the pages themselves loading the data. I am assuming you need the page to load the attributes not the latter. If it's the latter I can show ya that.

Steph
PauloCarvalhoDesign replied on at Permalink Best Answer Reply
PauloCarvalhoDesign
Hi there, I have a how-to waiting for approval that describes how to do this.
When approved I will post it here for future reference.!
For future reference I have wrote a how-to describing how to do this!
http://www.concrete5.org/documentation/how-tos/developers/how-to-in...
ThemeGoodness replied on at Permalink Reply
ThemeGoodness
Wow thank you very much. What I tried did not load them on the specific pages I wanted so this is very helpful.

Steph