Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Made all the taxonomy generate valid XHTML code.

  • Loading branch information...
commit 1d16fdb78aaf04e2f020ab994d27c41f21d627f6 1 parent 6f9f94e
Brian Loomis authored
14 app/controllers/application.inc
View
@@ -5,7 +5,7 @@ library:'/app/helpers/application_helper.inc';
library:'/config/valuelists.inc';
library:'/app/helpers/routes_helper.inc';
library:'/config/routes.inc';
-
+library:'/app/helpers/components_helper.inc';
/*
iterate: $STK_tagList, local:'STK_temptagName';
@@ -17,9 +17,6 @@ if: !(#STK_temptagName >> 'timer');
// */
//protect;
-include('/app/views/top.inc');
-///protect;
-
if($STK_Taxonomy);
/****************************************************************************
Check the one that we have a taxonomy
@@ -27,7 +24,7 @@ if($STK_Taxonomy);
inline: $dbconn,
-table ='resources',
-op = 'eq',
- 'page_url' = $test ,
+ 'page_url' = $STK_resp ,
-maxrecords = 1,
-Search;
@@ -46,7 +43,7 @@ if($STK_Taxonomy);
//$inlpageshowingaction;
//library:'/components/inSite/categories.inc';
rows;
- encode_smart:(process(column('description')));
+ var('body'=(process(column('description'))));
if: error_currenterror != 'no error';
error_currenterror;
/if;
@@ -57,6 +54,11 @@ if($STK_Taxonomy);
This is the best.
*****************************************************************************/
//protect;
+
+include('/app/views/top.inc');
+///protect;
+
+
include('/app/views/bottom.inc');
///protect;
4 app/helpers/application_helper.inc
View
@@ -15,9 +15,7 @@
'STK_StrInclude' =String,
'STK_XTRA_Params' =Array,
'STK_ExtraSitePages' =(Array:'workshops', 'contact', 'services'),
- // 'STK_tagList' =File_ListDirectory: '/components/inSite/',
-// 'STK_tagListTestBase' ='/test/mocks/development/',
-// 'STK_tagListTest' =File_ListDirectory: $STK_tagListTestBase,
+
);
3  app/views/bottom.inc
View
@@ -1,2 +1 @@
-</div></body></html>
-[include:'/app/views/partials/debug.inc']
+</body></html>
52 app/views/top.inc
View
@@ -1,15 +1,11 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
- "http://www.w3.org/TR/html4/strict.dtd">
-<html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta http-equiv="PRAGMA" content="NO-CACHE">
- <title></title>
+ <title>Yes</title>
<script src="/public/javascripts/jquery-latest.pack.js" type="text/javascript" charset="utf-8"></script>
<script src="/public/javascripts/thickbox.js" type="text/javascript" charset="utf-8"></script>
- <script type="text/javascript">
- $(document).ready(function(){
-
+ <script type="text/javascript"><!--
+ $(document).ready(function(){
$("a.expose").click(function () {
$("p.hideme").slideToggle("slow");
});
@@ -17,17 +13,33 @@
$("p.hideme2").slideToggle("slow");
});
});
+ -->
</script>
- <link rel="stylesheet" type="text/css" href="/public/stylesheets/fonts.css">
- <link rel="stylesheet" type="text/css" href="/public/stylesheets/base.css">
- <link rel="stylesheet" type="text/css" href="/public/stylesheets/grids.css">
- <link rel="stylesheet" type="text/css" href="/public/stylesheets/design.css">
- <link rel="stylesheet" type="text/css" href="/public/stylesheets/thickbox.css">
-
-
-
-
+ <link rel="stylesheet" type="text/css" href="/public/stylesheets/reset.css" />
+ <link rel="stylesheet" type="text/css" href="/public/stylesheets/text.css" />
+ <link rel="stylesheet" type="text/css" href="/public/stylesheets/960.css" />
+ <link rel="stylesheet" type="text/css" href="/public/stylesheets/design.css" />
+ <link rel="stylesheet" type="text/css" href="/public/stylesheets/thickbox.css" />
</head>
-<body onLoad="initialize()">
-<div class="content">
+<body>
+
+<div class="container_16">
+ <h2>
+ 16 Column Grid
+ </h2>
+ <div class="clear">&nbsp;</div>
+ <div class="grid_5">
+[var('cattable_resources'='resources',);
+encode_smart:(ul_taxonomy: -recurse=5, -css_id='calendar')]
+ </div>
+ <!-- end .grid_4 -->
+ <div class="grid_11">
+ [encode_smart:(var('body'))]
+ </div>
+ <div class="clear">&nbsp;</div>
+ <!-- end .grid_4 -->
+ <div class="grid_16">
+[include:'/app/views/partials/debug.inc']
+ </div>
+</div>
143 components/inSite/ul_taxonomy.inc
View
@@ -0,0 +1,143 @@
+[//lasso
+/*----------------------------------------------------------------------------
+
+[ul_taxonomy]
+Gives you unordered lists from taxonomies.
+
+Author: Brian Loomis
+Last Modified: Jun. 28, 2008
+License: Public Domain
+
+Description:
+This tag is used to return an unordered list based off of the xs_cat tags so
+that css flyout menus, or javascript jQuery madness can be applied for
+ultimate styling and sliding pleasure. http://www.cssplay.co.uk/menus/ See
+Stuart Nichols stuff. Once you get this tag implemented with xs_cat you will
+see how easy it is to optimize dynamic css menus from your database content.
+You can also modify the SQL generation easily enough to show only subnodes etc.
+
+
+Sample Usage:
+<?LassoScript
+var('br'='<br />');
+var('gv_error'='');
+var('comp_sql'='');
+!(lasso_tagexists: 'xs_cat') ?
+library:'/components/inSite/category_ctags.inc';
+var(
+ 'cattable_resources'='pages',
+
+ );
+
+
+
+define_tag(
+ 'taxonomy',
+ -namespace='ul_',
+ -req='css_id', -type='string',
+ -req='recurse', -type='integer',
+ -priority='replace',
+ -description='Returns nested unordered lists of elements of a taxonomy within the given path.'
+);
+local('out')='';
+var('SQL' = xs_cat->(fullCatSQL(-cattable= $cattable_resources ,-xtraReturn=', node.lft, node.rgt, node.description, node.metatags, node.metadescription, node.title_tag ',-xtraWhere='', -depth=#recurse)));
+
+ inline(-username='xxx',-password='yyy', -database='zzz',,-SQL=$SQL, -maxrecords='500');
+ var('depth'= integer(column('depth')));
+ var('c_depth'= integer(column('depth')));
+ #out += '<ul id="' #css_id '">\n' ('\t' * ($depth ))
+ records;
+ var('c_depth'= integer(column('depth')));
+ if: integer(column('depth'))==$depth;;
+ #out += ('\t' * ($depth + 1)) '<li class="li_' $c_depth '">' column('title') '</li>\n';
+
+ else: integer(column('depth'))>$depth;
+ #out += ('\t' * ($depth + 1)) '<ul>\n' ('\t' * ($depth + 2)) '<li class="li_' $c_depth '">' column('title') '</li>\n';
+
+ else: integer(column('depth')) < $depth;
+ #out += ('\t' * ($depth )) ('</ul>\n' * ($depth )) '</ul>\n<ul>\n' ('\t' * ($depth )) '<li class="li_' $c_depth '">' column('title') '</li>\n';
+
+ else;
+
+ /if;
+ var('depth'= integer(column('depth')));
+ /records;
+ #out += '<ul>\n';
+ /inline;
+ return: #out;
+
+/define_tag;
+
+encode_smart:(ul_taxonomy: -recurse=2, -css_id='calendar');
+
+?>
+
+gets you:
+
+<ul id="calendar">
+ <li class="li_0">Databases</li>
+ <ul>
+ <li class="li_1">PostGreSQL</li>
+ <li class="li_1">MySQL</li>
+ <li class="li_1">FileMaker</li>
+ </ul>
+
+</ul>
+
+
+Downloaded from tagSwap.net on Feb. 28, 2009.
+Latest version available from <http://tagSwap.net/ul_taxonomy>.
+
+----------------------------------------------------------------------------*/
+
+
+define_tag(
+ 'taxonomy',
+ -namespace='ul_',
+ -req='css_id', -type='string',
+ -req='recurse', -type='integer',
+ -priority='replace',
+ -description='Returns nested unordered lists of elements of a taxonomy within the given path.'
+);
+local('out')='';
+var('SQL' = xs_cat->(fullCatSQL(-cattable= $cattable_resources ,-xtraReturn=', node.lft, node.rgt, node.description, node.metatags, node.metadescription, node.title_tag, node.page_url ',-xtraWhere='', -depth=#recurse)));
+
+ inline($dbconn, -SQL=$SQL, -maxrecords='500'); var('this')=action_statement;
+ var('depth'= integer(column('depth')));
+
+ var('c_depth'= integer(column('depth')));
+ #out += '<ul id="' #css_id '">\n' ('\t' * ($depth )) ;//'<li class="li_' $c_depth '">' column('title') '</li>\n';
+ records;
+ var('page_url'= (column('page_url'))->Lowercase &);
+ var('c_depth'= integer(column('depth')));
+ if: integer(column('depth'))==$depth;;
+ #out += ('\t' * ($depth + 1)) '<li class="li_' $c_depth '"><a href="' var('page_url') '" class="">' column('title') '</a></li>\n';
+
+ else: integer(column('depth'))>$depth;
+ #out->(removetrailing('</li>\n'));
+ #out += '\r' ('\t' * ($depth + 2 )) '<ul>\n' ('\t' * ($depth + 2)) '<li class="li_' $c_depth '"><a href="' var('page_url') '" class="">' column('title') '</a></li>\n';
+
+ else: integer(column('depth')) < $depth;
+ var('newdepth'= ($depth - integer(column('depth'))));
+ loop: -from=1, -to=($newdepth );
+ #out += ('\t' * ($depth + 1)) '</ul>\n' ('\t' * ($depth )) '</li>\n' ;
+ /loop;
+ #out +=('\t' * ($depth -1 )) '</ul>\n' ('\t' * ($depth - 1)) '<ul>\n' ('\t' * ($depth )) '<li class="li_' $c_depth '"><a href="' var('page_url') '" class="">' column('title') '</a></li>\n';;
+
+ else;
+
+ /if;
+ // var('newdepth'= ($depth - integer(column('depth'))));
+
+ var('depth'= integer(column('depth')));
+ /records;
+ loop: -from=1, -to=($depth);
+ #out += ('\t' * ($depth + 1)) '</ul>\n' ('\t' * ($depth + 1)) '</li>\n' ;
+ /loop;
+ #out += '</ul>\n';
+ /inline;
+ //return: $this;
+ return: #out;
+
+/define_tag;
+]
BIN  public/images/16_col.gif
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1  public/stylesheets/960.css
View
@@ -0,0 +1 @@
+.container_12,.container_16{margin-left:auto;margin-right:auto;width:960px}.grid_1,.grid_2,.grid_3,.grid_4,.grid_5,.grid_6,.grid_7,.grid_8,.grid_9,.grid_10,.grid_11,.grid_12,.grid_13,.grid_14,.grid_15,.grid_16{display:inline;float:left;margin-left:10px;margin-right:10px}.container_12 .grid_3,.container_16 .grid_4{width:220px}.container_12 .grid_6,.container_16 .grid_8{width:460px}.container_12 .grid_9,.container_16 .grid_12{width:700px}.container_12 .grid_12,.container_16 .grid_16{width:940px}.alpha{margin-left:0}.omega{margin-right:0}.container_12 .grid_1{width:60px}.container_12 .grid_2{width:140px}.container_12 .grid_4{width:300px}.container_12 .grid_5{width:380px}.container_12 .grid_7{width:540px}.container_12 .grid_8{width:620px}.container_12 .grid_10{width:780px}.container_12 .grid_11{width:860px}.container_16 .grid_1{width:40px}.container_16 .grid_2{width:100px}.container_16 .grid_3{width:160px}.container_16 .grid_5{width:280px}.container_16 .grid_6{width:340px}.container_16 .grid_7{width:400px}.container_16 .grid_9{width:520px}.container_16 .grid_10{width:580px}.container_16 .grid_11{width:640px}.container_16 .grid_13{width:760px}.container_16 .grid_14{width:820px}.container_16 .grid_15{width:880px}.container_12 .prefix_3,.container_16 .prefix_4{padding-left:240px}.container_12 .prefix_6,.container_16 .prefix_8{padding-left:480px}.container_12 .prefix_9,.container_16 .prefix_12{padding-left:720px}.container_12 .prefix_1{padding-left:80px}.container_12 .prefix_2{padding-left:160px}.container_12 .prefix_4{padding-left:320px}.container_12 .prefix_5{padding-left:400px}.container_12 .prefix_7{padding-left:560px}.container_12 .prefix_8{padding-left:640px}.container_12 .prefix_10{padding-left:800px}.container_12 .prefix_11{padding-left:880px}.container_16 .prefix_1{padding-left:60px}.container_16 .prefix_2{padding-left:120px}.container_16 .prefix_3{padding-left:180px}.container_16 .prefix_5{padding-left:300px}.container_16 .prefix_6{padding-left:360px}.container_16 .prefix_7{padding-left:420px}.container_16 .prefix_9{padding-left:540px}.container_16 .prefix_10{padding-left:600px}.container_16 .prefix_11{padding-left:660px}.container_16 .prefix_13{padding-left:780px}.container_16 .prefix_14{padding-left:840px}.container_16 .prefix_15{padding-left:900px}.container_12 .suffix_3,.container_16 .suffix_4{padding-right:240px}.container_12 .suffix_6,.container_16 .suffix_8{padding-right:480px}.container_12 .suffix_9,.container_16 .suffix_12{padding-right:720px}.container_12 .suffix_1{padding-right:80px}.container_12 .suffix_2{padding-right:160px}.container_12 .suffix_4{padding-right:320px}.container_12 .suffix_5{padding-right:400px}.container_12 .suffix_7{padding-right:560px}.container_12 .suffix_8{padding-right:640px}.container_12 .suffix_10{padding-right:800px}.container_12 .suffix_11{padding-right:880px}.container_16 .suffix_1{padding-right:60px}.container_16 .suffix_2{padding-right:120px}.container_16 .suffix_3{padding-right:180px}.container_16 .suffix_5{padding-right:300px}.container_16 .suffix_6{padding-right:360px}.container_16 .suffix_7{padding-right:420px}.container_16 .suffix_9{padding-right:540px}.container_16 .suffix_10{padding-right:600px}.container_16 .suffix_11{padding-right:660px}.container_16 .suffix_13{padding-right:780px}.container_16 .suffix_14{padding-right:840px}.container_16 .suffix_15{padding-right:900px}.clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0}.clearfix:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.clearfix{display:inline-block}* html .clearfix{height:1%}.clearfix{display:block}
25 public/stylesheets/design.css
View
@@ -14,10 +14,31 @@ h1 {
}
.hideme {
-//display:none;
+display:none;
}
div.content {
text-align: left;
min-height:500px;
-}
+}
+
+.container_16
+{
+ background: #fff url(/public/images/16_col.gif) repeat-y;
+ min-height: 600px;
+}
+
+ul
+{
+ margin-left: 10px;
+}
+
+li
+{
+ margin-left: 10px;
+}
+
+a.action_node
+{
+ text-decoration: none;
+}
1  public/stylesheets/reset.css
View
@@ -0,0 +1 @@
+html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outline:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}
1  public/stylesheets/text.css
View
@@ -0,0 +1 @@
+body{font:13px/1.5 Helvetica,Arial,'Liberation Sans',FreeSans,sans-serif}a:focus{outline:1px dotted invert}hr{border:0 #ccc solid;border-top-width:1px;clear:both;height:0}h1{font-size:25px}h2{font-size:23px}h3{font-size:21px}h4{font-size:19px}h5{font-size:17px}h6{font-size:15px}ol{list-style:decimal}ul{list-style:square}li{margin-left:30px}p,dl,hr,h1,h2,h3,h4,h5,h6,ol,ul,pre,table,address,fieldset{margin-bottom:20px}
8 resources.lasso
View
@@ -120,10 +120,10 @@ select: $do;
'<a href="?do=subNode&amp;id=' (field('id')) '" title="Examine the whole tree under this node"><img src="/public/images/hr_subtree.png" alt="image" width="16" height="16" align="absmiddle" border="0" /></a> |\r';
- ' Sub Page <a href="?do=addChild&amp;id=' (field('id')) '#' loop_count '" title="Add a Child, this will add a new area with depth equal to this one plus one from the document root"><img src="/public/images/hr_add_child.png" alt="image" width="16" height="16" align="absmiddle" border="0" /></a> |\r';
- ' New Page <a href="?do=addSibling&amp;id=' (field('id')) '#' loop_count '" title="Add a Sibling, this will add a new area with depth equal to this one from the document root"><img src="/public/images/hr_dupe.png" alt="image"width="16" height="16" align="absmiddle" border="0" /></a> |\r';
- ' Move this Area Up 1 Node<a href="?do=moveNode&amp;id=' (field('id')) '" title="Move the Node, this will move this node and all its children up one level in the current hierachy, it will be the same distance from the document root." onclick="return confirm(\'Are you sure you want to MOVE THIS RECORD and all of the CHILDREN underneath it UP ONE ROW?\')"><img src="/public/images/hr_switch_nodes.png" alt="image"width="16" height="16" align="absmiddle" border="0" /></a> |';
- ' <a href="?do=deleteNode&amp;id=' (field('id')) '" title="Delete the whole node" onclick="return confirm(\'Are you sure you want to DELETE THIS RECORD and all its CHILDREN underneath it?\')"><img src="/public/images/hr_delete_node.png" alt="image"width="16" height="16" align="absmiddle" border="0" /></a>';
+ ' <a class="action_node" href="?do=addChild&amp;id=' (field('id')) '#' loop_count '" title="Add a Child, this will add a new area with depth equal to this one plus one from the document root">Sub Page <img src="/public/images/hr_add_child.png" alt="image" width="16" height="16" align="absmiddle" border="0" /></a> |\r';
+ ' <a class="action_node" href="?do=addSibling&amp;id=' (field('id')) '#' loop_count '" title="Add a Sibling, this will add a new area with depth equal to this one from the document root">New Page <img src="/public/images/hr_dupe.png" alt="image"width="16" height="16" align="absmiddle" border="0" /></a> |\r';
+ ' <a class="action_node" href="?do=moveNode&amp;id=' (field('id')) '" title="Move the Node, this will move this node and all its children up one level in the current hierachy, it will be the same distance from the document root." onclick="return confirm(\'Are you sure you want to MOVE THIS RECORD and all of the CHILDREN underneath it UP ONE ROW?\')">Move this Area Up 1 Node <img src="/public/images/hr_switch_nodes.png" alt="image"width="16" height="16" align="absmiddle" border="0" /></a> |';
+ ' <a class="action_node" href="?do=deleteNode&amp;id=' (field('id')) '" title="Delete the whole node" onclick="return confirm(\'Are you sure you want to DELETE THIS RECORD and all its CHILDREN underneath it?\')"><img src="/public/images/hr_delete_node.png" alt="image"width="16" height="16" align="absmiddle" border="0" /></a>';
'</div>\r';
Please sign in to comment.
Something went wrong with that request. Please try again.