Documenting Code and Collections

Is there anyway to document a WIX web site using velo coding.

Specifically, I want to

  1. printout schema for each collection to show Fieldname <> FieldKey;

  2. printout page code of ONLY function names (not the code itself which can be copied/pasted into NotePad++ etc); and

  3. printout the id of each field on a wix page [e.g. $w(“#myFieldName”)];

I am thinking of some type of function that will loop through each of the items and print to console.log or even an array, etc…

My intent is to print them and then use these as a reference while coding.


As an aside, is there anyway to go to a specific line of page code or bookmark a specific area of code in the code panel to help me jump back and forth while programing? Currently I use page-up/down or do a search.:tired_face:

As an aside, is there anyway to go to a specific line of page code or bookmark a specific area of code in the code panel to help me jump back and forth while programing? Currently I use page-up/down or do a search.

No!

Is there anyway to document a WIX web site using velo coding.

Specifically, I want to

  1. printout schema for each collection to show Fieldname <> FieldKey;

  2. printout page code of ONLY function names (not the code itself which can be copied/pasted into NotePad++ etc); and

  3. printout the id of each field on a wix page [e.g. $w(“#myFieldName”)];

YES! Possible!

You are already thinking into the right direction → using field-keys.

1) Do a query on your wished DATABASE.
2) Get your results.
3) Filter resulting ITEMS for —> Object-Keys.
4) Push found ones to an ARRAY.
5) You just got an ARRAY including all the DB-FIELD-IDs, just right now.

I know, this is a very very useful and important thing. Glad to see one who is trying to go DYNAMIC-ways!

3) printout the id of each field on a wix page [e.g. $w(“#myFieldName”)];

Wix-Pages do not include → FIELDS <—, they include —> ELEMENTS !

console.log(); —> will show you the logs!
console.log(‘Hello world!’);

$w.onReady(()=>{console.log('Page is ready...');
	console.log($w('#page1').children);	
	console.log($w('#page1').children[0]);
	console.log($w('#section1').children);
	console.log($w('#section1').children[0]);
});

You can expand this functionality by using a LOOP, which will loop though all CHILDREN-ELEMENTS or PARENT-ELEMENTS.

Thank you for your response and I will work on your suggestions. Also, appreciate the Fields vs Elements note. I’m new to the WIX environment and have run into other issues not knowing correct terminology, especially when doing searches! Thanks again.
Unfortunate not being able to navigate within the code panel. Oh, well.