Support for regions in HTML

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

Support for regions in HTML

Postby codeowl » March 28th, 2013, 1:11 am

Hey Guys....

I would be awesome if the regions were supported in HTML markup for PHP and HTML pages. The following is an example of how this may be implemented:

Code: Select all
    <!--#region Layout Templates -->
        <script type="text/x-kendo-template" id="testLayoutTemplate">
            <# for (var i = 0; i < data.length; i++) { #>
                <li>       
                <#= data[i].Name #>     
                </li>
            <# } #>
        </script>
    <!--#endregion-->


Regards,

Scott
codeowl
 
Posts: 51
Joined: February 10th, 2013, 10:05 am

Re: Support for regions in HTML

Postby Jakub Misek » March 28th, 2013, 11:53 am

Isn't there already regions settings in legacy HTML editor? So we would do it in the same way.

Thanks,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Support for regions in HTML

Postby codeowl » April 2nd, 2013, 12:29 am

Jakub,

Not sure what you mean mate. The code sample I posted doesn't not turn into a region in a PHP Tools Project when I create a new HTML page and past the code in there. The Script tag collapses, but I want to put several script tags inside a region.

Can you give me a code sample of how to do a region in a HTML page created in a PHP Tools Project?

Regards,

Scott
codeowl
 
Posts: 51
Joined: February 10th, 2013, 10:05 am

Re: Support for regions in HTML

Postby Jakub Misek » April 2nd, 2013, 11:12 am

PHP editor does not have HTML regions yet. I'm just curious whether HTML editor supports some sort of regions, so we would do it in the same way in PHP editor.

Thanks,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Support for regions in HTML

Postby codeowl » April 2nd, 2013, 10:23 pm

Jakub,

Ok cool, well no the HTML editor for an ASP project does not support regions as I have outlined.

Also in a PHP Tools project Javascript files don't seem to support regions either:
Eg;
Code: Select all
//#region Test Region
   
function testFunctionOne() {

}

function testFunctionTwo() {

}

//#endregion


Doesn't show as a collapsible region...

Regards,

Scott
codeowl
 
Posts: 51
Joined: February 10th, 2013, 10:05 am

Re: Support for regions in HTML

Postby Jakub Misek » April 2nd, 2013, 10:38 pm

If HTML editor does not support them, I'm not sure if we could. We'll definitely investigate this more.

Currently regions are supported only in PHP code. HTML/CSS/JS are different languages.

BTW regions can start with // too, so following would work:
//region
//endregion
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 64 guests

cron

User Control Panel

Login

Who is online

In total there are 64 users online :: 0 registered, 0 hidden and 64 guests (based on users active over the past 5 minutes)
Most users ever online was 330 on April 19th, 2024, 1:35 am

Users browsing this forum: No registered users and 64 guests