Closing a task

Edited 2 years 9 months ago

Site Studio it's an add-on to provide low-code functionalities to Drupal. Some tasks demand Site Studio operations; some tasks, only Drupal itself; some ones, both. For that ones which demand Site Studio actions, it's suppose to export all the packages involved in the execution.

In the videos below, we will show an example of how to create a new content, config export and close a task. Use them as a guide but consider taking different paths depending on the task.

Create new Content (Drupal)

 

1. Export drupal configs

lando drush @wals.local cex

2. Show all modified files that contains 'faq'

git status | grep 'faq'

3. Commit config files

git commit -m 'feat(faq): create new content type - faq'

4. Remove untracked files from the working tree

git clean -df
git checkout .

Creating content Template (Site studio)

Access:

Content > add content > Faq

Fill the fields and save. Go to:

Site studio > templates > content templates > content types > faq

Create new 'full content', mount the layout canvas and save. After that you can reload home page to see the changes.

Site studio > styles > custom styles > add custom type > heading

Fill in the fields, add the style and save. Now you can see the new changes.

 

Configuration export

Do that export process to each and every one package you created. If your task is alter a package that already exists, the process is almost the same, but with some little differences.

First of all, if your task involves Site Studio, you have to check the Site Studio Files Modified/Created sheet and check if someone else is working on the things you have to do to avoid conflicts. Anyways, it's always something good if you always fill what your working on and keep your tracks up to date in the sheet.

Access:

Site Studio > Sync packages > Manage packages

If the package is new, you have to 'Add package'. See Appendix A for reference to name the package.

In the Package requirements, go to Site Studio entities and later Content templates. On the checkbox list, check only your entity, and click in 'Build package' button. On the new checkbox list which will appear at right, check ONLY the entity you worked on and save the package.

Exception: if you created a thumbnail to your entity, you can also check the file in Files.

Now, you'll be redirected to 'Packages' page and you have to export the fresh package you just created clicking on the button 'Export package as file'. 

Rename the file only with the characters inside the parentheses. Example:

cohesion_sync_package_(pack_component_smart_age_gate)_component-custom-style-smart-age-gate-.package.yml 
to:
pack_component_smart_age_gate.package.yml_

Copy and put on ./abinbev/docroot/themes/custom/corebr_whitelabel/config/dx8.

 

Export Template

For this example, check only the title of the content type, in this case 'Full content (Node, Faq)' and click in 'Build package'. Select only 'Content templates' and save the package. Now, you'll be redirected to 'Packages' page and you have to export the fresh package you just created clicking on the button 'Export package as file'. 

1. See which files are modified, add and commit then

git status
git add
git commit -m 'feat(faq): added faq full template package.'

Export Custom Style

For this example, check only the title of the content style, in this case 'Heading 1' and click in 'Build package'. Select only 'Content styles' and save the package. Now, you'll be redirected to 'Packages' page and you have to export the fresh package you just created clicking on the button 'Export package as file'. 

1. See which files are modified, add and commit then

git status
git add
git commit -m 'feat(faq): added custom style heading 1 package'