Highlighted

Vertical jQuery UI tabs does not work in template (dwt) based html files

Community Beginner ,
May 07, 2019

Copy link to clipboard

Copied

Hello,

In DW cc, the template seems to have put some restriction on creating vertical jQuery UI tabs.

I am trying to create a vertical navigation menu in a web page which was from a website template in Dreamweaver CC. In the EditRegion, I tried inserting jQuery UI tabs, and then in properties switching orientation from horizontal to vertical to create a set of vertical tabs. That did not work. I was getting the message "Making this change would require changing code that is locked by a template or a translator. The change will be discarded". Note that if I create an new html file directly, not generated from a template (dwt), DW would allow vertical jQuery UI tabs.

I was wondering if anyone knows a solution to this issue, or may suggest a different way to make a vertical navigation menu. In older DW I used spry which worked well to create a vertical menu, but unfortunately spry is not available in the DW cc any more.

Thank you,

DZ

Adobe Community Professional
Correct answer by Nancy OShea | Adobe Community Professional

You still must place dependant files into your template.dwt file.  Save it and populate changes to child pages.  Otherwise, your vertical tabs won't work.

TOPICS
Create menus in Dreamweaver, Dreamweaver CC 2014

Views

516

Likes

Translate

Translate

Report

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

Vertical jQuery UI tabs does not work in template (dwt) based html files

Community Beginner ,
May 07, 2019

Copy link to clipboard

Copied

Hello,

In DW cc, the template seems to have put some restriction on creating vertical jQuery UI tabs.

I am trying to create a vertical navigation menu in a web page which was from a website template in Dreamweaver CC. In the EditRegion, I tried inserting jQuery UI tabs, and then in properties switching orientation from horizontal to vertical to create a set of vertical tabs. That did not work. I was getting the message "Making this change would require changing code that is locked by a template or a translator. The change will be discarded". Note that if I create an new html file directly, not generated from a template (dwt), DW would allow vertical jQuery UI tabs.

I was wondering if anyone knows a solution to this issue, or may suggest a different way to make a vertical navigation menu. In older DW I used spry which worked well to create a vertical menu, but unfortunately spry is not available in the DW cc any more.

Thank you,

DZ

Adobe Community Professional
Correct answer by Nancy OShea | Adobe Community Professional

You still must place dependant files into your template.dwt file.  Save it and populate changes to child pages.  Otherwise, your vertical tabs won't work.

TOPICS
Create menus in Dreamweaver, Dreamweaver CC 2014

Views

517

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 07, 2019 0
Adobe Community Professional ,
May 07, 2019

Copy link to clipboard

Copied

Site wide menus typically go inside your Template.dwt file and populate to all child pages.

In order for jQuery UI to work, you must include the following dependant files in your Template.dwt:

  • jQuery UI CSS
  • jQuery Core library
  • jQuery UI library
  • jQuery functions
  • miscellaneous CSS styles

Below a working code example.

<!doctype html>

<html lang="en">

<head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1">

<title>jQuery UI Tabs - Vertical Tabs functionality</title>

<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">

<script src="https://code.jquery.com/jquery-1.12.4.js"></script>

<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>

<script>

  $( function() {

    $( "#tabs" ).tabs().addClass( "ui-tabs-vertical ui-helper-clearfix" );

    $( "#tabs li" ).removeClass( "ui-corner-top" ).addClass( "ui-corner-left" );

  } );

  </script>

<style>

.ui-tabs-vertical { width: 55em; }

.ui-tabs-vertical .ui-tabs-nav {

padding: .2em .1em .2em .2em;

float: left;

width: 12em;

}

.ui-tabs-vertical .ui-tabs-nav li {

clear: left;

width: 100%;

border-bottom-width: 1px !important;

border-right-width: 0 !important;

margin: 0 -1px .2em 0;

}

.ui-tabs-vertical .ui-tabs-nav li a { display: block; }

.ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active {

padding-bottom: 0;

padding-right: .1em;

border-right-width: 1px;

}

.ui-tabs-vertical .ui-tabs-panel {

padding: 1em;

float: right;

width: 40em;

}

</style>

</head>

<body>

<div id="tabs">

<ul>

<li><a href="#tabs-1">Nunc tincidunt</a></li>

<li><a href="#tabs-2">Proin dolor</a></li>

<li><a href="#tabs-3">Aenean lacinia</a></li>

</ul>

<div id="tabs-1">

<h2>Content heading 1</h2>

<p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p>

</div>

<div id="tabs-2">

<h2>Content heading 2</h2>

<p>Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.</p>

</div>

<div id="tabs-3">

<h2>Content heading 3</h2>

<p>Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem. Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales. Quisque eu urna vel enim commodo pellentesque. Praesent eu risus hendrerit ligula tempus pretium. Curabitur lorem enim, pretium nec, feugiat nec, luctus a, lacus.</p>

<p>Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.</p>

</div>

</div>

</body>

</html>

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 07, 2019 1
Community Beginner ,
May 08, 2019

Copy link to clipboard

Copied

First, thanks for the suggestion and the code example.

Please note that I was not making a site wide menu.  The site template is for multiple pages, but only on one web page I would like to have a vertical navigation menu on left (EditRegion 3 in body element).  I am showing dwt codes here.

<!doctype html>

<html>

<head>

<!-- TemplateBeginEditable name="head" -->

<meta charset="utf-8">

<title>website_1</title>

<style type="text/css">

</style>

<!-- TemplateEndEditable -->

</head>

<body>

<!-- TemplateBeginEditable name="EditRegion3" -->EditRegion3<!-- TemplateEndEditable -->

</body>

</html>

You may see that in a html file created from dwt, there will be "editable" regions in head and body elements. I thought if one chose to insert jQuery UI tabs in the html file, DW would transfer/copy the dependent files to the corresponding editable region. However, apparently DW did not transfer ALL the files, resulting in vertical tabs not allowed. This is something Adobe DW may need to improve.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 08, 2019 0
Adobe Community Professional ,
May 08, 2019

Copy link to clipboard

Copied

You still must place dependant files into your template.dwt file.  Save it and populate changes to child pages.  Otherwise, your vertical tabs won't work.

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 08, 2019 1
zdn3023 LATEST
Community Beginner ,
May 08, 2019

Copy link to clipboard

Copied

Thanks for the clarification. That worked. After I copied all the codes including the styles into dwt, I was able to make vertical tabs in the child page.

After further testing, I found only the additional script and style codes are necessary to make the vertical tabs work,

1. The following script needs to be in the template/dwt file:

<script> 

  $( function() { 

    $( "#tabs" ).tabs().addClass( "ui-tabs-vertical ui-helper-clearfix" ); 

    $( "#tabs li" ).removeClass( "ui-corner-top" ).addClass( "ui-corner-left" ); 

  } ); 

  </script>

2. The style codes can be put either in dwt or in the related css file.

I am using CC 2018. In the child html page, inserting jQuery tabs automatically imported rest of js and css links to the html file. After I opened jQuery tabs properties and changed Orientation from horizontal to vertical, the tabs became vertically aligned on the left.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 08, 2019 1