Hels

Ok thanks, I'll try that website later - am on the tube now so can't use laptop to get the code!

✔️ (1)
fred.condo

gist is specifically https://gist.github.com but you could also use pastebin or the like (so as not to fill the chat with large files)

Hels

Thanks @fred.condo I will try. By "gist" do you mean the code snippet thing that the big plus button gives as an option? Sorry, but I am very new to this stuff & really struggle to use the correct jargon to describe my questions & to understand the jargon that others use!!!

fred.condo

@Hels I’d recommend you post your code in a gist and put the link here. I doubt anyone can diagnose your issue based on a prose description.

Hels

ha ha - no I’m not. 😉 but I see from your time zone that you are probably Australian so maybe pasties never made it that far. Although they are made from pastry they are a (very tasty) specific food from Cornwall. If you are ever in England you should definitely try one! I guess this proves that the English language is alot more complex/non-international than we like to think!! 😉 🤣

Hels

Hi guys, do any of you understand how the parent child thing works? My problem is to do with elemental-list blocks. I already asked for help last tuesday in the content-blocks channel & the advice was to follow how the module handles things, however I have copied exactly (as in literally copy/pasted) how it is on their web page but it is not working. I have an object (dataobject?) called “TabSetElement” which I made by extending ElementalList (without changing it at all, I just wanted the name to be different, and to put my own css classes in the template). I also made another one the same way called “TabElement”. The idea is that on an elemental-enabled page in the cms we can add a tabsetelement then in that add a set of tabelements each of which has other elements (all extensions of baseelement) inside it The difficulty comes in using the “First” method (provided by baseelement) in the template. according to what I see in the module code, it should look at the parent of the current element, check all the elements it owns & say true or false whether the current element is the first in the list. But it returns true for every tabelement! By looking at the outputs of the other methods available (evenodd, last, and position), I have figured out that instead of looking at the parent of the current element and seeing 3 child elements of which only 1 of them is first, it is looking at the grandparent of the current element, and seeing its 1 child (which is the parent of the current element) & so declaring that every one of my actual child elements is first because its parent is the first (and only) child of the grandparent I can post my actual codes if that helps I really hope someone out there can understand this & point me in the right direction - or even just tell me that its too complex & I should give up & do those pages in Wix & just link to them in the cms Thanks all - any advice gratefully received!! 😀

Mo

All appears to be working as expected now, cheers @bummzack

👍 (1)
Mo

Well it app/_config, so I though after everything would be OK 🙂

bummzack

I guess After: "#corefieldtypes" should be enough 😉

Mo

OK, we also needed to add

  1. After:
  2. - "*"
Mo

Hmm, OK interesting, maybe will try something else 😁

bummzack

You'd have to ensure your config comes after that one of course…