Buttons missing in page type/defaults on concrete 5.4.2

Permalink
In the recent update(5.4.2), i miss, in the section "page types/ defaults" to select the template, on "design" button.
whats happen with "properties button", "design button","versions button"...etc, in "page type/defaults" edit mode? the only button, i have now its "permissions button"

Thanx

pd:sorry for my bad english

vicsaizo
 
jordanlev replied on at Permalink Best Answer Reply
jordanlev
Those buttons were removed because they didn't actually do anything.

The buttons were there in older versions of Concrete5 but using them had no effect, so it was very confusing to people because they think they can set the default properties and default design, but those would NOT be assigned to new pages. And also there is no version history of the page default so the "version" button did not do anything either.

No functionality was removed -- instead the buttons that don't do anything were removed.
vicsaizo replied on at Permalink Reply
vicsaizo
I think these buttons were very useful, if you work on a website with more than one template.
Currently not find a way to associate a "page type" with a template, if the template isn´t the active template

thanx for your answer
jordanlev replied on at Permalink Reply
jordanlev
I'm not sure I understand what the problem is -- those buttons never did anything so removing them does not take away any functionality.

If you want to change the Page Defaults of a different template, just go to Dashboard -> Pages and Themes -> Page Types, and click the "Defaults" button next to the page type you want to change.
vicsaizo replied on at Permalink Reply
vicsaizo
There is no way to set the "defaults" to a "page type" for a template, than isn´t the active template.
The problem is if you have several templates and your website you need to share content across multiple pages, you can only do so through "page types" on pages who using the active template, and not the rest.
In my case, the need is because I have several templates that do not have the same areas.

one more time, thanks
Mnkras replied on at Permalink Reply
Mnkras
I still don't get it,
jordanlev replied on at Permalink Reply
jordanlev
Yes, there is a way to set defaults for ALL page types, even if they are not active.
Go to Dashboard, then click "Pages and Themes" in the sidebar, then click "Page Types" in the top grey bar. You will see all page types listed, and next to each one is a button called "Defaults". You can click each button to change the defaults for each page type. Changing defaults for one page type only applies to that one page type -- not for any other page types. This is how it has always worked -- the toolbar buttons that are now gone have nothing to do with that (and they never did).
vicsaizo replied on at Permalink Reply
vicsaizo
I think that I not explain Well; if have not the same areas, in all the templates, i only can work on the active template
regards
jordanlev replied on at Permalink Reply
jordanlev
Sorry, I don't understand what it is you're asking then so unfortunately I can't help :(
diabolodesign replied on at Permalink Reply
diabolodesign
it's false.
try in the older version to add a custom attribute (for example a custom date or a text label).
In the older versions of C5 these fields were filled when you create a new page.
Now you can do this anymore.
jordanlev replied on at Permalink Reply
jordanlev
I never experienced this working in an old version. Are you sure about this? What version number was it?

The core team seems to think this never worked either, so I'm pretty sure even if I'm mistaken that they know what they're talking about.
diabolodesign replied on at Permalink Reply
diabolodesign
After some testing on an older version, It doesn't work with every attribute. I think they have remove it to avoid a mix of working/not working stuff.
jordanlev replied on at Permalink Reply
jordanlev
What attributes did it work on in the past?
I know this doesn't help right now, but Andrew has said that making default attributes work is at the top of the priority list for the next release of Concrete5. (Who knows when that will be, though).
diabolodesign replied on at Permalink Reply
diabolodesign
I don't have tested all but I am sure it works for:

Date/Time
File/Image
Page Title

For example, for the File/Image I have set it (a default thumbnail image for a pagelist) in the older version of C5 and now it works in the new release but have no possibility to change/edit/delete the attribute
kirkroberts replied on at Permalink Reply
kirkroberts
I know this is an old thread, but I'm missing having the Page Type default properties right now.

Sure, it was misleading because those properties weren't actually populated in new pages, but the properties could be accessed through the Master Template.

For instance, I was using the Page Type default to set a fallback sidebar image, and would retrieve it like this:
$ct = CollectionType::getByHandle($c->getCollectionTypeHandle());
$sidebarImg = $ct->getMasterTemplate()->getAttribute('sidebar_image');


This was nice because I could set the attribute using the File Manager.
After upgrading to 5.4.2.2 an old page type still has the default sidebar image saved, but I can't use the same technique on a new page type because there is no Properties tab when editing the Page Type defaults.

Perhaps there is another workaround?
jordanlev replied on at Permalink Reply
jordanlev
You could add the button back in by editing this file:
SITEROOT/concrete/tools/page_controls_menu_js.php


Find this chunk of code (around line #133):
<?php  if ($cp->canWrite() && !$c->isMasterCollection()) { ?>
    menuHTML += '<li class="ccm-main-nav-edit-option" <?php  if (!$c->isEditMode()) { ?> style="display: none" <?php  } ?>><a href="javascript:void(0)" id="ccm-nav-properties"><?php echo t('Properties')?></a></li>';
 <?php  } ?>


...and remove the "&&!$c->isMasterCollection()" check, so it becomes this:
<?php  if ($cp->canWrite()) { ?>
    menuHTML += '<li class="ccm-main-nav-edit-option" <?php  if (!$c->isEditMode()) { ?> style="display: none" <?php  } ?>><a href="javascript:void(0)" id="ccm-nav-properties"><?php echo t('Properties')?></a></li>';
 <?php  } ?>
kirkroberts replied on at Permalink Reply
kirkroberts
Sweet! Jordan to the rescue!

Totally works, and I'm back to default attribute bliss :-)

Thanks!
jordanlev replied on at Permalink Reply
jordanlev
No problem -- I feel kind of bad now because I'm the one that removed the buttons in the first place :-/
I had no idea they actually served a purpose.

It looks like the next release of C5 will probably have working default attributes, so this won't be a problem after a month or two. (Of course note that I'm going off of pre-release alpha version code and am in no way making any kind of official statement on behalf of the C5 people).
kirkroberts replied on at Permalink Reply
kirkroberts

I think disabling the Properties button on page type defaults probably
did MUCH more good than harm.
Maybe the new release will have true page type default properties.
For now, my workaround is fine.

Thanks again!
arrestingdevelopment replied on at Permalink Reply
arrestingdevelopment
Just came across this thread because I was trying to set Page Defaults of Properties in 5.4.2.2. I've been working on several sites in 5.5.1 and really liking the ability to set default Properties on Page Types so that they are available and/or pre-populated when a new page is created using that Page Type.

I was actually surprised to find that this ISN'T possible on 5.4.2.2. Or, at least, I'm ASSUMING it's not, based on this thread.

IS it possible to set-up defaults (like a Custom Attribute appearing or the value of the "Exclude from Nav" attribute) for Page Types in 5.4.2.2?

Thanks!
kirkroberts replied on at Permalink Reply
kirkroberts
To my knowledge setting default properties isn't natively supported in 5.4.2.x
You have to hack it in using the advice in this thread.

I agree that being able to set default properties in 5.5.x is REALLY nice!

*** EDIT *** Just look at the last few posts between and me and Jordan to see how to access "default" properties with code. That's the only way to do it for sure. Otherwise the real answer is that it isn't possible.
arrestingdevelopment replied on at Permalink Reply
arrestingdevelopment
Thanks, Kirk. That's what I suspected about default properties not being available and/or working in v5.4.2.x. It IS a bummer, because I'm already addicted to the feature on 5.5! Just not sure I want to launch this current site I'm working on with 5.5... 5.4.2 is so much more "stable".

I'll check out the last few posts and see if that will work for me as a solution... otherwise, I may just have to take the "chance" and launch this site using 5.5 instead.

Thanks for the help!

- John
kirkroberts replied on at Permalink Reply
kirkroberts
You should be able to do it. In your page templates where you're checking for an attribute just also check for the MasterTemplate attribute like in my example above then proceed as normal.
pseudo-code:
- is the page attribute set or not set AND is the master template attribute set or not set?
- then do or do not (as Yoda might say)

5.5 is shaping up nicely, but if you're in the late stages of production on a 5.4 site then I'd be wary of making that jump. Definitely check that ALL your add-ons are compatible before doing so!
kirkroberts replied on at Permalink Reply
kirkroberts
Actually, just realized my pseudo-code example is bunk.
You probably have to either always go with the MasterTemplate or nothing. You can't override it with the actual page's value. At least it seems that way in the 35 seconds I just spent thinking about it :-)

Good luck!
arrestingdevelopment replied on at Permalink Reply
arrestingdevelopment
LOL! Thanks!

- John