Jump to content

Standardwebseiten von IIS schöner gestalten


Der letzte Beitrag zu diesem Thema ist mehr als 180 Tage alt. Bitte erstelle einen neuen Beitrag zu Deiner Anfrage!

Empfohlene Beiträge

Hallo

 

hab da mal ne bescheidene Frage zu IIS, ich habe in meiner Firma mit Hilfe von IIS ein kleines aber bis jetzt gut funktionierendes Intranet aufgebaut. Es kam allerdings der Wunsch auf die Seiten unterhalb der index.htm vom Layout her also Überschrift und solche Sachen schöner zu gestalten. Alle Seiten die auf der index.htm als Link aufrufbar sind, sind freigegebene Standardwebseiten auf dem IIS. Wo kann ich das Layout solcher Standardwebseiten anpassen, bzw. geht das überhaupt, oder muss ich mich mit den Standardvorgaben, wie "to parent Directory" zufrieden geben?

 

 

Danke schonmal im vorraus

 

Gruß

BJG :rolleyes:

Link zu diesem Kommentar

Ich hoffe, dass der Link hier etwas hilft. Habe ihn selber gerade erst gefunden, aber werde es jetzt gleich mal ausprobieren... :D

 

Grüsse

 

http://www.webmasterworld.com/forum47/520.htm

 

Irgendwie komme ich nicht mehr rein, hier also der Text:

 

If anyone else wants to know how to do it then here's the code:

<%

Dim objFSO, objFile

Dim sMapPath, objFolder

 

'Create File System Object to get list of files

Set objFSO = CreateObject("Scripting.FileSystemObject")

 

'Get The path for the web page and its dir, change this setting to view different directories!

sMapPath = server.mapPath("./.") ' this means the current directory

 

'Set the object folder to the mapped path

Set objFolder = objFSO.GetFolder(sMapPath)

' Then for each file in the object we loop through and print the file and when it was last modified

For Each objFile in objFolder.Files

 

' Print out a link to the file

Response.Write "<tr><td><a href="""&objFile.Name&""">"

Response.write objFile.Name &" </a></td><td> "& objFile.DateLastModified ' the file name and its date

Response.write " </td></tr>" ' close the tags

 

Next ' Loop back

 

' Clear the objects

Set objFSO = Nothing

Set objFolder = Nothing

 

%>

 

Just a few tips:

 

1. Put the ASP in a separate directory to the one you want to list or the ASP will get listed too.

 

2. Wherever you put the ASP make sure you change the line

sMapPath = server.mapPath("./.") to the directory you want to list eg sMapPath = server.mapPath("./this_directory") AND change the line <a href="""&objFile.Name&"""> to that directory too eg <a href=""this_directory/"&objFile.Name&""">

 

3. You can call the ASP anything you like and point to it but you could also, as Dreamquick stated, call it one of the default name such as index.asp or default.asp so that the server automatically runs it.

 

4. You might want to change the HTML code a bit if you don't want it in a table however you'll need to put a <br> at the end to get the format correct.

Link zu diesem Kommentar
Der letzte Beitrag zu diesem Thema ist mehr als 180 Tage alt. Bitte erstelle einen neuen Beitrag zu Deiner Anfrage!

Schreibe einen Kommentar

Du kannst jetzt antworten und Dich später registrieren. Falls Du bereits ein Mitglied bist, logge Dich jetzt ein.

Gast
Auf dieses Thema antworten...

×   Du hast formatierten Text eingefügt.   Formatierung jetzt entfernen

  Only 75 emoji are allowed.

×   Dein Link wurde automatisch eingebettet.   Einbetten rückgängig machen und als Link darstellen

×   Dein vorheriger Inhalt wurde wiederhergestellt.   Editor-Fenster leeren

×   Du kannst Bilder nicht direkt einfügen. Lade Bilder hoch oder lade sie von einer URL.

×
×
  • Neu erstellen...