Jump to content


Oliver

Member Since 12 May 2011
Offline Last Active Mar 14 2013 04:25 AM
-----

Topics I've Started

Responsive Images

19 February 2013 - 05:36 PM

Because I’ve never been really happy with the current strategies (I know) to deliver images the right solutions in responsive layouts, I lately started to work on my own approach. Other solutions like for example Wilcox’ Adaptive Images just rely on the screen resolution/window size or require additional (and manually added) data attributes or even js/noscript hacks in the markup.

For me it was important to have a solution, that is installed once and then just works. So I took some ideas from other stratgies and put something together that seems to work so far (but I still have to test it in older browsers). Feel fr-e to give it a try. I’d love to get some feedback on this. For detailed info have a look at the README.

 

https://github.com/o...sponsive-Images


Updating PW using git merge?

30 November 2012 - 06:22 AM

I store each of my PW projects in separate repos. When it comes to updating the version of PW used for a project, I'm sure there has to be an easy way to merge the master or dev branch of the PW repo into am update branch of the current project's repo. I already added the PW repo as remote source. But as I'm far from being a git pro, I haven't found the right way to do an update appropriately without getting everything messed up. It would be great if one or two of you guys would sketch their approach to updating a PW installation using git and github in a few words.

List of fields to display in the admin Page List

28 August 2012 - 07:12 AM

It's great that you can choose the fields of template that will be displayed in the Page List in admin pannel. But I really miss the possibility to use a field of a page reference field of a template to be displayed, too.

A current website I'm working on uses a «project» template with a page reference field «client». As the title of the projects are often very similar or even the same, it would be a big help for editors to have the referenced client's page title added to the project's title in Page List. Like:
List of fields to display in the admin Page List
title client->title

But I guess I've to create a little module to get this working, hm?

How to manipulate buildEditForm in ProcessField?

28 July 2012 - 04:21 AM

Is there any way to manipulate the form created by ProcessField's not hookable method buildEditForm? It's used by the hookable executeEdit method. But by adding a hook after executeEdit, I just can access the rendered HTML code executeEdit returns. Changing the markup is definitely not the way to go here. Adding a hook before is also useless, as the buildEditForm is called after the hook would have been executed.

The only idea I got is to set the form property through a hook before, as it would be used by executeEdit if it already is set.
public function ___executeEdit() {
  if(is_null($this->form)) $this->buildEditForm();
  ...
But as I can't access the protected buildEditForm method from outside the class, it seems there is just the way to copy buildEditForm completely, change it and use it to set ProcessField's form property before executeEdit instead of just accessing the form to perform minor changes or additions. Anyone a better idea? Or would it make sense to make the form generation more accessible for hooks?

Extending FieldtypeModule

07 July 2012 - 05:53 AM

Is there a certain reason, why there is no way to add a module reference field through the usual field creation process in backend? It doesen't appear in the list. I'm aware of the fact that it mostly stores process modules for backend. Nevertheless there are some cases when a module reference field is a nice thing to have in frontend pages.
Lately I tried to create a Fieldtype extending FieldtypeModule, but the extension failed because of the order the modules are loaded depending on their status flags.
So there is no way to make the module reference field accessable for field setup but by changing status flags manually or creating a copy of the fieldtype with a different status flag?