how to populate dropdown combobox with web pages? Options
martin
Posted: Thursday, March 15, 2007 7:09:56 PM
Rank: Devotee

Joined: 7/24/2006
Posts: 249
How would I go about populating a combobox (xslt or .net) with a listing of webpages?

ie: I have a web page that looks like this:
March 2007
February 2007
January 2007
December 2006
etc..
That each link to a web page of the same name, what I would like to do is replace the page above with a combobox that will dynamically read a folder.
can someone post a sample if possible?
martin
Posted: Thursday, March 15, 2007 9:25:51 PM
Rank: Devotee

Joined: 7/24/2006
Posts: 249
Ok I have managed to create a simple macro (use in editor)using this xslt code:
Code:

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp " "> ]> 
<xsl:stylesheet   
    version="1.0"   
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"   
    xmlns:msxml="urn:schemas-microsoft-com:xslt" 
    xmlns:umbraco.library="urn:umbraco.library" 
    exclude-result-prefixes="msxml umbraco.library"> 
  <xsl:output method="xml" omit-xml-declaration="yes"/> 
<xsl:param name="currentPage"/> 
<xsl:template match="/"> 
<!-- start writing XSLT --> 
<ul class="thirdLevelNavigation"> 
<xsl:for-each select="$currentPage/ancestor-or-self::node   
[@level=3]/node [string(data [@alias='umbracoNaviHide']) != '1']"> 
<li> 
<a href="{umbraco.library:NiceUrl(@id)}"> 
<xsl:if test="$currentPage/ancestor-or-self::node/@id =   
current()/@id"> 
<!-- we're under the item --> 
<xsl:attribute name="class">selected</xsl:attribute> 
</xsl:if> 
<xsl:value-of select="@nodeName"/></a> 
</li> 
</xsl:for-each> 
</ul> 
</xsl:template> 
</xsl:stylesheet> 


so I can drop this macro on a page and it will list all the folders underneath itself which is what I wanted.
so now out of curiosity how would I translate this to use a dropdown list?
martin
Posted: Friday, March 16, 2007 5:35:00 PM
Rank: Devotee

Joined: 7/24/2006
Posts: 249
using the above code on a test server works just great, really fast redraw .
but when I use the same code on our production server which is an exact duplicate of our testing server, the page takes forever to load in the editor and I get a
" No macro content available for WYSIWYG editing" but it still loads correctly on the live web page.

does anyone see by the code above why this might happen?
Is there something missing in the code above?
thanks for any insight ( so far I'm just talking to myself here )
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.