Jump to content

View dependency support in repeater OR PageTableInline


Nico Knoll
 Share

Recommended Posts

Hey,

I would like the repeater to fully support view dependency. At the moment it works sometimes. Sometimes the new values won't get saved after hitting the save button or the field will be shown the whole time.

It would be enough if the "=" comparator would be supported completely.

I know this hacky solution where you have to uncomment the following code in config.php (even if I don't know exactly how it works):

/**
 * Settings specific to InputfieldWrapper class
 *
 * Setting useDependencies to false may enable to use depencencies in some places where
 * they aren't currently supported, like files/images and repeaters. Note that setting it
 * to false only disables it server-side. The javascript dependencies work either way. 
 *
 * Uncomment and paste into /site/config.php if you want to use this
 * 
 * $config->InputfieldWrapper = array(
 *	'useDependencies' => true,
 * 	'requiredLabel' => 'Missing required value', 
 *	);
 * 
 */

But even with this set to false it sometimes stops working...

It would really important for my current content creation model:

I use "content section" repeater where you can choose the type at the top (normally "text" and "image(s)"). So the body field only needs to be visible if "text" is selected and same for the images field.

post-140-0-55182700-1424875644_thumb.png

At the moment I don't know a solution to handle this smarter (maybe PageTableExtended but haven't tried it that far).

So ... yeah that's my wish ;)

Thanks,

Nico

  • Like 1
Link to comment
Share on other sites

Nico,

I used to have the exact same setup (it still lingers on a site that I haven't transition to PTE yet). In my case, it always seemed to work great. However, it sounds like Ryan has no plans to provide any further dependency support for repeaters.

post-474-0-82171500-1424878902_thumb.png

I'll be moving the repeaters shown above to PTE soon — just feels like a better solution. 

  • Like 1
Link to comment
Share on other sites

PageTableInline is really the thing I miss the most about "repeatable" parts of pages. Directly followed by settings to change its behavior like from multiplier to textareas profields. Either free adding of blocks, but maybe limited in number, or a fixed number of them which can be labeled, e. g. a page with three profiles (image, headline, text) and being able to call it like this:

echo $page->profile_1->text;
echo $page->profile_2->text;
echo $page->profile_3->text;

Funnily I've not used repeaters for a bit of time now, they are kinda useless for most of my usecases.

  • Like 2
Link to comment
Share on other sites

It would be nice to at least have something like "PageTableInline" than - otherwise I will have to open a modal for every page section which can be really annoying if you have a lot of them :)

I completely agree, except it should be PageTableExtendedInline - to me that would be a great interface - need to think about how complicated this might be to put together :)

I also don't like the modal approach of PageTable - that is definitely where repeaters have the edge - that said, repeaters have too many limitations so I don't ever use them.

  • Like 2
Link to comment
Share on other sites

I think it would be reasonable simple to add inline editing into PTE blocks case by case, but saving would be simpler as ajaxified, not on regular page save.

All inline editing is damn hard to do in general manner when you have markup agnostic system like pw. I have tried on front end when building Fredi, and yes, easy with simple text, difficult with anything else.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...