Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include Virtual #6

Open
milacay opened this issue May 6, 2021 · 18 comments · May be fixed by #27
Open

Include Virtual #6

milacay opened this issue May 6, 2021 · 18 comments · May be fixed by #27
Labels
enhancement New feature or request

Comments

@milacay
Copy link

milacay commented May 6, 2021

I was browsing extensions for classic ASP and so glad that I found this. Does this work for "nclude virtual"? I have many pages using "include virtual" instead. That would be wonderful if it works for "include virtual".
<!--#include virtual="include/utilities.asp" -->

Thank you,

@zbecknell zbecknell added the enhancement New feature or request label May 6, 2021
@zbecknell
Copy link
Owner

I think we can make this happen. Here's my thought on how it'd search for a virtual path:

  1. Allow virtual paths to be set by the user with a setting
  2. If no paths are set by the user, search for the folder and try and include the file by inferring the path based on the search. Ideally we could provide a warning on the include that indicated that the path is inferred.

I'm glad you find it useful. I do plan on making it better as time goes on but it's a side project. We have a lot of ASP still at my company and it's better to have something than nothing so far.

@milacay
Copy link
Author

milacay commented May 6, 2021

Thank you for the quick response. Great Work!
This is one important feature that doesn't work in the Dreamweaver. With your "ASP-Classic-Support" and the "Classic ASP Syntaxes and Snippets" nearly perfect what I need for editing the Classic ASP pages. I am trying to find a CSS Extension that can pickup (Intellisense) all the CSS classes both Linked [<link rel="stylesheet">] and embedded[<style></style>]for ASP pages , but not luck. Any suggestions?

@zbecknell
Copy link
Owner

Unfortunately I don't think there's a solution right now for CSS. But this is something I intend to help with when I can implement #4.

@zbecknell
Copy link
Owner

zbecknell commented May 7, 2021

Actually @milacay regarding the CSS completion: I just testing this extension and it works! You can add asp as a language option to provide CSS completion for your ASP files.

image

You may also be able to use this more popular extension but a lot of people seem to be complaining about it.

@milacay
Copy link
Author

milacay commented May 7, 2021

Unfortunately, the "IntelliSense for CSS class names in HTML" doesn't work for me. I found the Extension Settings, open the settings.json for "html-css-class-completion.HTMLLanguages" and add "asp" in the language list. Still didn't work. Anything else I need to do? (Sorry, I am new to Visual Studio Code)

My style link is like below and Dreamweaver detects the CSS classes in that file (same test file).
<link href="../Dir/Dir2/Styles.css" rel="stylesheet" type="text/css" />

Thanks again for your time helping out.

@milacay
Copy link
Author

milacay commented May 7, 2021

Figured it out now. The asp files need to be in the WorkSpace. :)
Really appreciated your time. Thank you so much!

@milacay
Copy link
Author

milacay commented May 25, 2021

I have been using this extension since I found it (3 weeks ago) and I really like it. I can't wait for the "include virtual" feature to be released. As you mentioned "Allow virtual paths to be set by the user with a setting" would work just fine. Thank you for awesome extension.

@RobbieS82
Copy link

This is exactly what I am looking for, plus the nested includes as mentioned by Issue #11 . It's incredible to still find so much support for ASP Classic. I admit I am one of those that still uses it everyday just because I like it. The virtual path could be a per-workspace setting, i.e. it assumes the root folder is the workspace root level, so virtual="/config.asp" finds the config.asp file in the root of the workspace.

@zbecknell
Copy link
Owner

Sorry it took so long. Include virtual is now implemented. You'll find a new setting where you can set up your virtual paths:

image

Here you are setting up the virtual root directory and the root physical (absolute) directory that it should point to. Let me know if there are any problems getting this to work.

@milacay
Copy link
Author

milacay commented Mar 22, 2022

This is great. Thank you for you hard work.
I re-installed the ASP Classic Support extension (v0.5.1), but don't see the Virtual Paths settings. Can you please advise on how to install this "Virtual Paths" new feature?

image

@zbecknell zbecknell reopened this Mar 22, 2022
@zbecknell
Copy link
Owner

Looking into this, apologies for that @milacay.

@milacay
Copy link
Author

milacay commented Mar 23, 2022

no problem. Thank you!

@zbecknell
Copy link
Owner

You should see a corrected version to update to now @milacay. Thanks for bringing this to my attention!

@milacay
Copy link
Author

milacay commented Mar 24, 2022

Thanks for implemented the correct version on VS Code. I tested the Virtual Paths feature, but it was not able to get it working. Let's me describe what I have tried so far:

Brief info of my environment:
My "include" full path on the IIS sever is C:\inetpub\wwwroot\Apps\include.
I mapped the drive (P) on my laptop to the server (C): P:\inetpub\wwwroot\Apps\include.
I included the virtual directory like this <!--#include virtual="include/FunctionXYZ.asp" --> every page and it is working.

I have tried to following settings for the new Virtual Paths option, but no success and received OUTPUT error: __TypeError: localIncludes is not iterable__.
1)
image

image

image

I just have missed something. Please advise.

@zbecknell zbecknell reopened this Mar 24, 2022
@zbecknell
Copy link
Owner

It's most probably that I missed something, as it seems that your settings look just fine. I need to test this more thoroughly and hopefully this'll be a quick fix.

@milacay
Copy link
Author

milacay commented May 18, 2022

I am still using this extension daily and it is awesome. Any chance the the "include virtual" setting will release soon? :)

@milacay
Copy link
Author

milacay commented Oct 15, 2022

Any chance that you have look into that quick fix for the "include virtual"? You have the feature built already, but just need to fix a small error somewhere. Much appreciated!

@AndryHTC
Copy link

AndryHTC commented Jun 22, 2023

This extension is like a life-saving oasis for handling sizable, time-honoured Classic ASP projects! The virtual path fix would be awesome.

Just for reference, ASPFellow has Virtual Paths working

@NafisAli NafisAli linked a pull request Aug 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants