Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Transferring Collapsed Code Scripts

Explorer ,
Apr 05, 2017 Apr 05, 2017

Hiya Everyone,

My CSS file is very clean and split up into multiple sections with some sections having multiple seconds within, and alike a multi-drop-down menu I have collapsed each sections code within, however if I then save and send to another developer, the code is not collapsed for them but is when I relaunch my Adobe CC Dreamweaver.

Is there a way to save how I have collapsed my code for them to open and see this at all?

Best Regards,

Tim !

261
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 05, 2017 Apr 05, 2017

Only DW knows you want those sections collapsed, there's nothing being saved into the HTML file itself that says "collapse this section of code".

When giving code to other developers, rather than collapsing sections (which will only show in your version of DW), use html and css comments at the beginning and end of sections to keep things organized in a way that works across all editing environments.

Translate
LEGEND ,
Apr 05, 2017 Apr 05, 2017

Sorry but no, but that is a setting exclusive to your installation.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2017 Apr 05, 2017

Only DW knows you want those sections collapsed, there's nothing being saved into the HTML file itself that says "collapse this section of code".

When giving code to other developers, rather than collapsing sections (which will only show in your version of DW), use html and css comments at the beginning and end of sections to keep things organized in a way that works across all editing environments.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 05, 2017 Apr 05, 2017

I do use comments but within the code is collapsed

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 05, 2017 Apr 05, 2017

You could include a comment at the top of the page, saying which line numbers are the ones updated, for the other person to read.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2017 Apr 05, 2017

The code collapse for each page is written into files that are saved in your DW personal Configuration folder. The program will only read them under your user account, so even if someone else logged into your machine, the collapse preferences you set wouldn't work for them if they're under a different user account.

You "might" (I've never tried this) be able to also hand over those collapse files and have the recipient place them in their own personal config folder. I have no idea if it will work, but you can find the files by turning on your OS's hidden files and going to...

C > Users > your username > AppData (usually hidden) > Roaming > Adobe > Dreamweaver CC (your version) > your language > Configuration > CodeCollapse > cache

There you will have a list of gibberish file names with .mcc extensions. Expand all of your code and save the file. That will make the collapse file for that page disappear. Re-collapse the code and save, the new file that appears is the one holding the collapse info. Giving that file to another user, along with the html, might just give them the same collapse points in the page, but I'm pretty sure absolutely everything else would need to be the same too (as far as the DW Site Definition goes) and they'd have to be using DW and place the file in the same hidden folder.

Probably way more trouble than it's worth.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 05, 2017 Apr 05, 2017

I thought about this after discovering I cannot save them into the script.

I was thinking for a DW update, an export feature which exports the file along with collapsed areas config.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2017 Apr 05, 2017

If enough people are interested, making a Feature Request from DW under Help > Submit Bug/Feature Request, could result in something like that getting added to the program.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2017 Apr 05, 2017
LATEST

I've got an even better idea.  Start using Server-Side Includes.  They will significantly reduce the amount of code you look at in parent pages.  If & when you need to access the code they contain, simply open the include file.

Example:

<!doctype html>

<html lang="en">

<head>

<meta charset="utf-8">

<title>Untitled Document</title>

<?php require_once('Includes/head.html'); ?>

</head>

<body>

<?php require_once('Includes/header.html'); ?>

<?php require_once('Includes/navigation.html'); ?>

<h1>My Awesome Website</h1>

<h2>Some Pithy Slogan</h2>

<h3>Heading 3</h3>

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Repudiandae modi numquam nulla ipsam, in animi culpa, eos veniam, beatae odio odit sapiente sunt! Libero obcaecati nostrum quas fuga, eius labore.

</p>

<?php require_once('Includes/footer.html'); ?>

<?php require_once('Includes/scripts.html'); ?>

</body>

</html>

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines