RX 5.7 snippet code

hi all

i have a variant where i simply want to include a managed navigation slot contained in a ul. when i drag this onto the workbench it complains with the following

Could not process the HTML file for querying. “tidy” has failed.
Missing closing tag for opening tag: start slot nav_TopPONew

if i replace my ul with a div, i don’t get the error message. however, i don’t want a div. ideally i don’t even want the ul, i just want the snippet code. full variant code below - can anybody explain this weird error.

thanks
michelle

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>psx-sys_title</title>
<link psx-href="$rxs_navbase/css/TouristMain.css" rel="stylesheet" href="css/TouristHome.css" type="text/css" />
<!-- begin XSL -->
<xsl:comment><![CDATA[[if IE 6]>
  <link href="../web_resources/POTourist/css/TouristMainIE6.css" rel="stylesheet" type="text/css" />
<![endif]]]></xsl:comment>
<xsl:comment><![CDATA[[if IE 7]>
  <link href="../web_resources/POTourist/css/TouristMainIE7.css" rel="stylesheet" type="text/css" />
<![endif]]]></xsl:comment>
<!-- end XSL -->
<style type="text/css">
	ul#TopNav {padding-left:0;}
	ul.MainNav li a{font-size:0.6em;}
</style>
<script type="text/javascript" src="../web_resources/POTourist/js/jquery-1.3.1.min.js">;</script>
<script type="text/javascript" src="../web_resources/POTourist/js/dummyHover.js">;</script>
<script type="text/javascript">
	$(document).ready(function() {
		SetUpHover();
	});
</script>


</head>
</body>
	<ul id="TopNav" class="MainNav">
		<!-- start slot nav_TopPONew -->
		<!-- start snippet wrapper -->
		<span psxeditslot="no" slotname="nav_TopPONew">top nav here</span>
		<!-- end snippet wrapper -->
		<!-- end slot nav_TopPONew -->
	</ul>
</body>
</html>

hi all

i have a similar problem as below. i have rx slot code

 	<!-- start slot nav_midPO -->
			<!-- start snippet wrapper -->
			<span psxeditslot="no" slotname="nav_midPO" />
			<!-- end snippet wrapper -->
			<!-- end slot nav_midPO -->
			<!-- begin xsl -->

when i wrap a ul around this i get the tidy error when dragging onto the workbench. anybody know why i am getting this and how i can fix it.

thanks
michelle

True, you can’t have a UL without an LI or Tidy is unhappy.

Here’s an example from one of our snippets if it helps…


<ul class="toc_lnks">
<!-- start slot -->
<!-- start snippet wrapper -->
<li class="toc_lnks">
<span psxeditslot="no" slotname="QueryIndexResult" />
</li>
<!-- end snippet wrapper -->
<!-- end slot -->
</ul>

I believe the ul tag should move after the start slot line if there is a possibility the list is ever empty to supress the UL (in our case that doesn’t happen).

thanks ruth

but it is the insertion of the ul that causes tidy to complain. my snippet code produces an li. this snippet is allowed in a slot. i need to wrap the slot code in the ul.

if i omit the ul altogether rx somehow and for some reason inserts a ul with class=“noindent” around each li - this is not what i need - i need a single ul around the output of the slot.

cheers
michelle

Hi Michelle

If that’s the case then you may have to create a slot template. I would however think about making your snippet template more generic by removing the li and adding them to the slot markup.

Cheers
James

Hi James

i have tried this. The slot template is a navigation template. I have successfully put the ul in here. However, this template uses the PSOMutateSlotVariants function - and if i include the li in this template, rx refuses to perform the transformation. It does include the li and ul successfully but does not transform the variants.

thanks
michelle

Don’t know if this is related to your problem, but your opening body tag is actually a closing tag. This may cause problems elsewhere.

thanks paul - that initial message was posted a long time ago and the closing body tag does not appear now