<?xml version="1.0" encoding="UTF-8"?>    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
        <title></title>
        <link>https://interactivetools.com/forum/forum-search.php?k=user%3Adavidcmsb</link>
        <description></description>
        <pubDate>Mon, 20 Apr 2026 06:00:27 -0700</pubDate>
        <language>en-us</language>
        <atom:link href="https://interactivetools.com/forum/forum-search.php?rss=1&amp;k=user%3Adavidcmsb" rel="self" type="application/rss+xml" />

                <item>
          <title>Tag Cloud - need help</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2230053#post2230053</link>
          <description><![CDATA[<p>Awesome, congratulations and thank you for posting the code.</p>

<p>David</p>
<p>000000</p>]]></description>
          <pubDate>Fri, 29 Mar 2013 02:42:27 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2230053#post2230053</guid>
        </item>
                <item>
          <title>Tag Cloud - need help</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2230010#post2230010</link>
          <description><![CDATA[<p>Thank you.  That'll be great.  Great work. </p>
<p>00000000</p>]]></description>
          <pubDate>Sun, 24 Mar 2013 05:05:56 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2230010#post2230010</guid>
        </item>
                <item>
          <title>Tag Cloud - need help</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2230006#post2230006</link>
          <description><![CDATA[<p>This looks great.  I'd love to know how to create a tag cloud using CMSB.</p>

<p>Could you please post in one clear "how to" post all the steps and code to implement the tag cloud in CMSB.</p>

<p>Thanks very much,</p>
<p>David</p>]]></description>
          <pubDate>Sat, 23 Mar 2013 19:17:26 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2230006#post2230006</guid>
        </item>
                <item>
          <title>Tag Cloud - need help</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2229981#post2229981</link>
          <description><![CDATA[<p>Hi dwellingproductions,</p>

<p>Checked out your page and the design looks great.</p>

<p>I want to do a tag cloud like that too.</p>

<p>Where did you get the software for it?  Do you have a link to it you can share?</p>

<p>Thanks,</p>
<p>David</p>
<p>00000000</p>]]></description>
          <pubDate>Thu, 21 Mar 2013 15:56:52 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2229981#post2229981</guid>
        </item>
                <item>
          <title>Different headlines for same article appearing on list pages depending on Category selected by public end user????</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2217008#post2217008</link>
          <description><![CDATA[I’m stumped on this.  I’m wondering if it is even possible, and if it is, just how to do it.<br /><br />I want to make the headlines that appear for the articles, both in the list pages and on the article page itself, change depending on the CMSB Category.<br /><br />Here’s what I mean specifically:<br /><br />The articles are summaries of baseball games.  I’ve set things up in CMSB so that the articles get “tagged” by assigning them to one or more of several CMSB Categories I’ve set up in CMSB for what type of game it was.  (I use a multi-select list in CMSB Admin for this.)  For example the CMSB Categories and Sub-Categories for game types I’ve set up in CMSB Admin are:<br /><br />-Game Summaries:<br />—Pitching Duels<br />—Slug Fests<br />—Extra Innings<br />[note: my system actually has dozens of these subcategories, so there’s lots of them]<br /><br />So, if a game was only a Pitching Duel, the article for it gets assigned to that CMSB Category.  When a public end user of the site selects that Category from the menu on the public page, the article for this game appears in the article list (along with all the other articles also tagged with this CMSB Category).<br /><br />And, if a game was both a Pitching Duel and an Extra Innings game also, the article for it gets assigned to both of those CMSB Categories.   This way, that article appears on the list page if either CMSB Category   — Pitching Duel or Extra Innings — is selected by the public  end user viewing the site.<br /><br />I’ve got the foregoing set up and running fine.<br /><br />BUT here’s the problem I’m trying to solve now: <br /><br />Using the last example above, i.e., an article that’s assigned to two or more CMSB Categories (such as one that’s assigned to both, e.g., the Pitching Duel and the Extra Innings CMSB Categories), will appear on on both these list pages with the same headline.  That’s a problem.  Here’s an example why.<br /><br />If an article about a game was both a Pitching Duel and also an Extra Innings type game, the single headline for that article I write when creating the article in CMSB Admin (there is a filed named ‘headline’) might just be about only one of these aspects — e.g., “Giants Win In Extra Innings In The 15th Inning” OR “Jones Pitches Brilliant Game, Leaves 7th Inning”.  <br /><br />So, if I use  “Jones Pitches Brilliant Game, Leaves 7th Inning” as the headline for the article, that headline will appear on the list pages for both categories.  This is fine when it appears on the list page for the “Pitching Duel” Category.  But this is not fine when it appears on the list page for the “Extra Innings” Category.  It looks weird.  It doesn’t relate.  It would of course be better and make more sense to the public site’s end user if the headline for this article when it appears on the list page for the “Extra Innings” Category was a different headline, such as “Giants Win In Extra Innings In The 15th Inning”.<br /><br />I’ve wracked my brain on this.  I was thinking about setting up for the article in CMSB several different headline fields, e.g., headline1, headline2, headline3, etc., and using these to write several different headlines for the article.  But I cannot think of how to tie these headlines to what gets outputted when a Category is selected by the end user of the public site.<br /><br />In very broad conceptual terms, I guess that this needs something that correlates the headline1 etc. to what Category gets selected.  This can’t be hard coded and must work dynamically depending on the Category.  <br /><br />I was further thinking in trying to suss this out that I’d also probably need to indicate which Category the headline1 relates to and goes with, and maybe could somehow do this in the headline1 field entry itself when I write the headline, i.e., some code parenthetical (that doesn’t appear to the public user) I put in the headline1 field itself  to say what Category the headline goes with, maybe something like:  <br /><br />headline1 field:<br />&lt;?php ‘category’=9 ?&gt; Jones Pitches Brilliant Game, Leaves 7th Inning<br />AND<br />headline2 field:<br />&lt;?php ‘category’=12 ?&gt; Giants Win In Extra Innings In The 15th Inning<br /><br />But even if this is possible (to use php code in the field itself) and the right approach for saying what Category the particular headline goes with, I still can’t see what code I’d need in the foreach loop on the list page to tell it that if the selected category is Category num 9, then use the headline1, and likewise if the Category is num 12, then to use in that case the headline2 field.<br /><br />One thing I thought about and rejected is creating multiple copies of the article, each copy with its own headline and assigned single Category.  That would wreck havoc and not be manageable for many reasons, including the fact that there’s going to be hundreds of articles and this would just confuse thing terribly to have multiple copies of the same article.<br /><br />Another thing I thought about and rejected is to write the single headline for the article that covers all these game aspects of the game, but that would result in headlines I don’t really want and that’d be too long, because a game might have 5 aspects and fall into 5 Categories.<br /><br />So, any ideas on how to have different headlines for the same article appear on list pages depending on the Category shown by the list page?<br /><br />Thanks,<br />David<br />]]></description>
          <pubDate>Mon, 16 Jul 2012 19:45:24 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2217008#post2217008</guid>
        </item>
                <item>
          <title>How to generate nav menu for only particular part of a Category menu tree  branch?</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2216772#post2216772</link>
          <description><![CDATA[Hi,<br /><br />I need to know how to have a vertical navigation menu on the public website show only a particular portion of a category menu tree from a certain point on one branch through to the ending last child menu item.<br /><br />Let's say my categories in CMSB are set up with this hierarchy:<br /><br />-Food<br />-Drinks<br />--Sodas<br />---Coke<br />---Pepsi<br />-Booze<br />--Mixed Drinks<br />---Screwdriver<br />---White Russian<br /><br />I want to be able to have a vertical navigation menu appear on the public website that would show a particular branch starting from a particular point through to the end.  For example, a menu that shows just the Mixed Drinks menu items, i.e. --<br /><br />--Mixed Drinks<br />---Screwdriver<br />---White Russian<br /><br />-- OR a menu that shows just the Drinks menu items, i.e. --<br /><br />-Drinks<br />--Sodas<br />---Coke<br />---Pepsi<br /><br /><br />After studying the fields generated by CMSB for Categories, I think I figured out the logic needed to do this, but don't know exactly how to code it in PHP.<br /><br />To do what I want to do, it seems that the lineage field is the key.  <br /><br />Looking at the entries in the lineage field, I see that all category items in the same branch, starting from a particular point in the branch, include the same category num in the lineage field and that is the category num for the starting point in the branch I want to select.<br /><br />So I need to have the code run a foreach loop and generate the vertical navigation menu only for category items whose lineage field contains and includes (not equals) a given category num, i.e., :2:, so it would pick up all category items whose lineage field includes that category num for the category where I want the menu to start being output from<br /><br />In English (as opposed to PHP), it seems that the logic here would be:<br /><br />• Run foreach loop, but only on Category records whose lineage field includes, e.g., :2: and echo for these categories the link and label.<br /><br />But I do not know the exact specific code in PHP language needed to do this.<br /><br />I use the following PHP code to generate the the vertical navigation for all category items on the public web pages--<br /><br /><code>&lt;?php foreach ($categoriesRecords as $categoryRecord): ?&gt; <br />		<br />      &lt;?php echo $categoryRecord['_listItemStart'] ?&gt; <br /><br />    	  &lt;a href=&quot;&lt;?php echo $categoryRecord['_link'] ?&gt;&quot;&gt;&lt;?php echo $categoryRecord['name'] ?&gt;&lt;/a&gt; <br />      	  <br />      &lt;?php echo $categoryRecord['_listItemEnd'] ?&gt; <br /><br />&lt;?php endforeach ?&gt; </code><br /><br />How do I modify this to do what I want to do here and show a menu only for a selected branch starting at a given point I select in the branch?  What is the specific PHP code I should use?<br /><br />I was thinking, in logic terms, something like this, but need to know the exact PHP code for it.  Shown below is the code above, modified to show the logic I think is needed, using English (not PHP) in Capital letters:<br /><br /><code>&lt;?php foreach ($categoriesRecords as $categoryRecord): ?&gt; <br /><br />        • IF A RECORD'S LINEAGE FIELD CONTAINS AND INCLUDES :2:, THEN DO THIS ONLY FOR EACH ONE THAT DOES HAVE :2: IN ITS LINEAGE FIELD:<br />		<br />      &lt;?php echo $categoryRecord['_listItemStart'] ?&gt;<br /> <br />   	      &lt;a href=&quot;&lt;?php echo $categoryRecord['_link'] ?&gt;&quot;&gt;&lt;?php echo $categoryRecord['name'] ?&gt;&lt;/a&gt; <br />      	  <br />      &lt;?php echo $categoryRecord['_listItemEnd'] ?&gt; <br /><br />        • END THE IF <br /><br />&lt;?php endforeach ?&gt; </code><br /><br />I'm also wondering if I'd need to wrap the whole thing inside of some conditional if statement, maybe something like:<br /><br /><br /><code>• IF A RECORD'S LINEAGE FIELD CONTAINS AND INCLUDES :2:, THEN DO THIS ONLY FOR EACH ONE THAT DOES HAVE :2: IN ITS LINEAGE FIELD:<br /><br /><br />&lt;?php foreach ($categoriesRecords as $categoryRecord): ?&gt; <br /><br />        • IF A RECORD'S LINEAGE FIELD CONTAINS AND INCLUDES :2:, THEN DO THIS ONLY FOR EACH ONE THAT DOES HAVE :2: IN ITS LINEAGE FIELD:<br />		<br />      &lt;?php echo $categoryRecord['_listItemStart'] ?&gt;<br /> <br />   	      &lt;a href=&quot;&lt;?php echo $categoryRecord['_link'] ?&gt;&quot;&gt;&lt;?php echo $categoryRecord['name'] ?&gt;&lt;/a&gt; <br />      	  <br />      &lt;?php echo $categoryRecord['_listItemEnd'] ?&gt; <br /><br />        • END THE IF <br /><br />&lt;?php endforeach ?&gt;<br /><br /><br />• END THE IF</code><br /><br /><br />Another permutation is that perhaps if it is wrapped inside an outer if statement, then I wouldn't need the inner if statement???  I have no idea.  I'm not that fluent in PHP, but am in English.  <br /><br />So I thought I'd write out here in English what I've figured out the logic to be (i.e., run the foreach and listitemstart/end routine that generates the vert. nav menu but only on category records whose lineage field contains the category num I pick, so it generates a menu starting with that category and going through to all of the end children in that branch and its sub-branches), and ask if you think that's the correct logic to do what I want, and if so, what is the PHP code I should use.<br /><br />So, <br /><br />(A) do you think that using the lineage field like this to identify the category items I want in the menu that is output is the correct way to go? <br /><br />and, <br /><br />(B) If so, what's the exact PHP code I'd need to do what I'm trying to do.  I want to do this in the body, not in the initial call in the head.<br /><br />Thanks very much,<br />David<br />]]></description>
          <pubDate>Tue, 26 Jun 2012 14:51:42 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2216772#post2216772</guid>
        </item>
                <item>
          <title>Install question</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2216745#post2216745</link>
          <description><![CDATA[Does the /cmsAdmin/  folder have to be in the first level of the website folder, such that it's path must be /cmsAdmin/ ?<br /><br />Or can I put it in a folder I create, so it is a subfolder and not in the first level, i.e., /admin/cmsAdmin/ <br /><br />In other words, I want to create a folder called &quot;admin&quot; and put the cmsAdmin folder inside of that.<br /><br />Is that ok?<br />]]></description>
          <pubDate>Fri, 22 Jun 2012 13:17:29 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2216745#post2216745</guid>
        </item>
                <item>
          <title>Re: [Jason] Selected item in nav using _isSelectedBranch</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2214691#post2214691</link>
          <description><![CDATA[Hi Jason,<br />I have a question about what you wrote --<br /><br /><blockquote>Hi Jan,<br /><br />_isSelectedBranch will only ever be set if $selectedCategory has a value.  This will either be set if there is a record number at the end of the URL or if you set 'selectedCategoryNum' in your getCategories.<br /><br />Hope this helps</blockquote><br /><br /><br /><br />Does _isSelectedBranch work if you use <br />'selectedCategoryNum' =&gt; @$_REQUEST['category'],<br />instead of the default behavior of looking at the number at the end of the URL or setting a static  'selectedCategoryNum'  <br />?<br /><br />What you wrote seems to say that _isSelectedBranch will only ever be set if $selectedCategory has a value, and the $selectedCategory has a value ONLY if (a) there is a record number at the end of the URL or (b) if you set 'selectedCategoryNum' in your getCategories.  But what about using instead of these two ways, using 'selectedCategoryNum' =&gt; @$_REQUEST['category'],<br />?<br />]]></description>
          <pubDate>Mon, 09 Jan 2012 15:36:40 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2214691#post2214691</guid>
        </item>
                <item>
          <title>Re: [rez] If any item&apos;s checkbox is true</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2212673#post2212673</link>
          <description><![CDATA[Thanks, Jason and Rez, that was helpful, don't know right now if I fully get it, but I think when I study this more I should.  Rez, that was helpful and helped me better understand things here.<br />]]></description>
          <pubDate>Thu, 11 Aug 2011 16:07:07 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2212673#post2212673</guid>
        </item>
                <item>
          <title>Re: [Jason] If any item&apos;s checkbox is true</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2212614#post2212614</link>
          <description><![CDATA[Thank you, Jason.<br /><br />But I'm confused and don't understand why you used the entire record set, as you say.  <br /><br />Why do that if the top code's Where clause is limiting output to show only checked records and that's the only records the poster said he wanted outputted and displayed?  <br /><br />Wouldn't you only need the getRecords array top code with that Where clause that limits displayed records to those with the box checked, and then as you say just use in the bottom code a foreach loop, without surrounding that as you did with the call of the entire record set (i.e., the &lt;?php if ($itemsRecords): ?&gt; which you added)?<br /><br />Thanks for clarifying this and helping me understand.<br /><br />David<br />]]></description>
          <pubDate>Mon, 08 Aug 2011 15:14:25 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2212614#post2212614</guid>
        </item>
                <item>
          <title>Re: [Jason] If any item&apos;s checkbox is true</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2212608#post2212608</link>
          <description><![CDATA[Hi Jason,<br /><br />I'm following this, trying to learn, and have a couple of questions.<br /><br />1.  With respect to your use of &lt;?php if($record['new_item']):?&gt;, I would have thought that this IF would have been something like if if($record['new_item'] ==1).  Can you please explain and help me understand why you used instead &lt;?php if($record['new_item']):?&gt;?  Does this catch and include an item if it is other than O, so that ==1 does not need to be used?<br /><br />2.  Why is there the need for this IF clause in light of the  'where'       =&gt; &quot;new_item = '1'&quot;,  at the top?  I would have thought that this would have only included records where the new_tem field was set to 1, which would obviate a need for the IF clause.<br /><br />Thanks in advance for helping me understand and clarifying these things.<br /><br />David<br />]]></description>
          <pubDate>Mon, 08 Aug 2011 13:52:09 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2212608#post2212608</guid>
        </item>
                <item>
          <title>Re: [ross] How to have &lt;div&gt; added in &lt;ul&gt; category menu link list generated by CMSB generated</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2212385#post2212385</link>
          <description><![CDATA[Thanks Ross.  Let's for now do the second thing you said, i.e., give me some code you think will work and I'll test it and let you know the results.  You should probably be able to give me some code that will create the unordered list structure that needs to work for this.<br /><br />Thanks,<br />David<br />]]></description>
          <pubDate>Mon, 25 Jul 2011 13:56:37 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2212385#post2212385</guid>
        </item>
                <item>
          <title>Re: [Jason] How to have &lt;div&gt; added in &lt;ul&gt; category menu link list generated by CMSB generated</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2212371#post2212371</link>
          <description><![CDATA[Thanks, Jason.<br /><br />Two things:<br /><br />[1]  I'd like to understand _isLastChild better.  When I first looked at the code in your reply, I didn't understand this line:<br /><br />  &lt;?php if ($category['_isLastChild'] &amp;&amp; !$category['_hasChild']): ?&gt; <br /><br />To me, this says that if the item is _isLastChild and it does not have a child.  I didn't understand how something could be both _isLastChild but also have a child itself --  I had been assuming that _isLastChild meant the ultimate very last child at the very end of a branch (and since its the last item it would not have children), thus a last child item would not by definition have a child.  But your code made me think that _isLastChild might instead mean the last child _in a level_ (and the last child in a level can have children below it on a sub level).<br /><br />So, what exactly does _isLastChild specifically mean?  Does it mean last child in a level, and not the ultimate very last child at the very end of a branch?<br /><br />[2]  At first your code did not work and outputted only php errors about undefined variables.  I tweaked it a little by replacing the variable names you used to be the ones I used and it output the list without php errors, but it did not output and render the list properly.  My list should be indented like this:<br /><br />1st No Alpha Test Category<br />Cats<br />Dogs<br />- Alaskan Huskie<br />-- Musher Huskie<br />-- Sarah Palin Huskie<br />- Boxers<br />-- Long Hair<br />-- Short Hair<br />Fish<br /><br />Using _listItemStart did generate it indented like this, as I should be.<br /> <br />BUT your code put Fish indented in one level, putting it at the same level as Alaskan Huskie and Boxers, i.e., as a sub of Dogs, and not at the same level as Dogs as it should be as shown immediately above.  Here's what your code generated after I tweaked it to use the correct variable names:<br /><br />1st No Alpha Test Category<br />Cats<br />Dogs<br />- Alaskan Huskie<br />-- Musher Huskie<br />-- Sarah Palin Huskie<br />- Boxers<br /> -- Long Hair<br />-- Short Hair<br />- Fish<br /><br /><br />And here's the code that generated this (i.e., your code that I corrected the variable names in):<br /><br /><code>&lt;div&gt; <br />  &lt;ul&gt; <br />    &lt;?php foreach ($categoriesRecords as $categoryRecord): ?&gt; <br />      &lt;li&gt;&lt;?php echo $categoryRecord['name'];?&gt; <br />     <br />      &lt;?php if ($categoryRecord['_hasChild']): ?&gt; <br />        &lt;div&gt; <br />          &lt;ul&gt; <br />      &lt;?php else: ?&gt; <br />        &lt;/li&gt; <br />      &lt;?php endif ?&gt; <br />       <br />      &lt;?php if ($categoryRecord['_isLastChild'] &amp;&amp; !$categoryRecord['_hasChild']): ?&gt; <br />          &lt;/ul&gt; <br />        &lt;/div&gt; <br />      &lt;?php endif ?&gt; <br />       <br />&lt;?php endforeach ?&gt; <br />&lt;/ul&gt; <br />&lt;/div&gt;</code><br /><br />And here's the the html for this that got generated using your code:<br /><br /><code>&lt;div&gt; <br />  367  &lt;ul&gt; <br />  368     <br />  369      &lt;li&gt;1st No Alpha Test Category <br />  370     <br />  371       <br />  372        &lt;/li&gt; <br />  373       <br />  374       <br />  375       <br />  376       <br />  377 <br />  378      &lt;li&gt;Cats <br />  379     <br />  380       <br />  381        &lt;/li&gt; <br />  382       <br />  383       <br />  384       <br />  385       <br />  386 <br />  387      &lt;li&gt;Dogs <br />  388     <br />  389       <br />  390        &lt;div&gt; <br />  391          &lt;ul&gt; <br />  392       <br />  393       <br />  394       <br />  395       <br />  396 <br />  397      &lt;li&gt;Alaskan Huskie <br />  398     <br />  399       <br />  400        &lt;div&gt; <br />  401          &lt;ul&gt; <br />  402       <br />  403       <br />  404       <br />  405       <br />  406 <br />  407      &lt;li&gt;Musher Huskie <br />  408     <br />  409       <br />  410        &lt;/li&gt; <br />  411       <br />  412       <br />  413       <br />  414       <br />  415 <br />  416      &lt;li&gt;Sarah Palin Huskie <br />  417     <br />  418       <br />  419        &lt;/li&gt; <br />  420       <br />  421       <br />  422       <br />  423          &lt;/ul&gt; <br />  424        &lt;/div&gt; <br />  425       <br />  426       <br />  427 <br />  428      &lt;li&gt;Boxers <br />  429     <br />  430       <br />  431        &lt;div&gt; <br />  432          &lt;ul&gt; <br />  433       <br />  434       <br />  435       <br />  436       <br />  437 <br />  438      &lt;li&gt;Long Hair <br />  439     <br />  440       <br />  441        &lt;/li&gt; <br />  442       <br />  443       <br />  444       <br />  445       <br />  446 <br />  447      &lt;li&gt;Short Hair <br />  448     <br />  449       <br />  450        &lt;/li&gt; <br />  451       <br />  452       <br />  453       <br />  454          &lt;/ul&gt; <br />  455        &lt;/div&gt; <br />  456       <br />  457       <br />  458 <br />  459      &lt;li&gt;Fish <br />  460     <br />  461       <br />  462        &lt;/li&gt; <br />  463       <br />  464       <br />  465       <br />  466          &lt;/ul&gt; <br />  467        &lt;/div&gt; <br />  468       <br />  469       <br />  470 <br />  471&lt;/ul&gt; <br />  472&lt;/div&gt;</code><br /><br /><br />So the question now is, with this testing feedback from me, what should the code be to output and generate the list properly with the correct indentation?<br /><br />It looks like a closing &lt;/ul&gt; to close the sub level under Dogs needs to be added before the &lt;li&gt; is generated before Fish.  In other words, it seems that the code has to somehow adjust for what sub level, or sub sub level or sub sub sub level, the item immediately above Fish is at.  I'm hoping the code you reply with will adjust for this, since the above is just a simple working example and my actual site may have different or more levels than this simple working example.  I'm guessing it probably is something like some code that selects the last child in a level that adds the closing &lt;/ul&gt; for sub levels to close it off else the item below will be included in the same level.<br /><br />Thanks in advance, looking forward to the code you can supply.<br /><br />David<br /><br />Thanks,<br />David<br />]]></description>
          <pubDate>Fri, 22 Jul 2011 15:31:38 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2212371#post2212371</guid>
        </item>
                <item>
          <title>Re: [davidcmsb] Need Help with a Category Menu styling problem please</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2212352#post2212352</link>
          <description><![CDATA[Follow up -- Eureka, with a little more fiddling I got it to work, using this code:<br /><br /><code>&lt;ul&gt; <br />	&lt;li&gt;&lt;a href=&quot;?&quot;&gt;(All Articles)&lt;/a&gt;&lt;/li&gt; <br /><br />&lt;?php foreach ($categoriesRecords as $categoryRecord): ?&gt; <br />      &lt;?php echo $categoryRecord['_listItemStart'] ?&gt; <br />	    &lt;?php if ($categoryRecord['_hasChild'] &amp;&amp; $categoryRecord['_isDescendantSelected']): ?&gt;<br />			&lt;b&gt;&lt;a href=&quot;#&quot;&gt;&lt;?php echo $categoryRecord['name'] ?&gt;&lt;/a&gt;&lt;/b&gt;		<br />		<br />		&lt;?php elseif ($categoryRecord['_hasChild']): ?&gt;<br />			&lt;a href=&quot;#&quot;&gt;&lt;?php echo $categoryRecord['name'] ?&gt;&lt;/a&gt;<br />		<br />		&lt;?php else: ?&gt; <br /> <br />	          &lt;?php if ($categoryRecord['_isSelected']): ?&gt; &lt;b&gt; &lt;?php endif ?&gt; <br />    	  &lt;a href=&quot;?category=&lt;?php echo $categoryRecord['num'] ?&gt;&quot;&gt;&lt;?php echo $categoryRecord['name'] ?&gt;&lt;/a&gt; <br />      	           &lt;?php if ($categoryRecord['_isSelected']): ?&gt; &lt;/b&gt;&lt;?php endif ?&gt; <br />       <br />	       &lt;?php endif ?&gt; <br /><br />      &lt;?php echo $categoryRecord['_listItemEnd'] ?&gt; <br /><br />&lt;?php endforeach ?&gt; <br />    <br />&lt;/ul&gt;</code><br /><br />I figured out that I needed to use an elseif, and structure it this way, with the most specific condition as the first IF, and then the more general as the ELSEIF, before then going on to everything else, i.e., [1] IF category menu item has a child and if a descendant is selected, then output null link and wrap in bold tag, or [2] ELSEIF category menu item has a child then output null link, otherwise [3] output the links and add bold tags if the item is the selected category.  <br /><br />So, I did get it working and thought I'd post this in case anyone thinks this is no good or there are better ways to do it.  (Still haven't figured out the answer to what I posted about in my other post, about wrapping a &lt;div&gt; tag around the &lt;ul&gt; tags that CMSB adds around submenu items, so if anyone has any ideas, here is the link -- http://www.interactivetools.com/iforum/Products_C2/CMS_Builder_F35/How_to_have_%3Cdiv%3E_added_in_%3Cul%3E_category_menu_link_list_generated_by_CMSB_generated_P89145/)<br />]]></description>
          <pubDate>Fri, 22 Jul 2011 07:21:56 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2212352#post2212352</guid>
        </item>
                <item>
          <title>How to have &lt;div&gt; added in &lt;ul&gt; category menu link list generated by CMSB generated</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2212350#post2212350</link>
          <description><![CDATA[Hi,<br /><br />I want to use the category menu list of links to categories that CMSB generates with a menu script.  This menu script is a Dreamweaver extension that generates the &lt;ul&gt; list like this:<br /><br /><code>div id=&quot;p7TMM_1&quot; class=&quot;p7TMM04&quot;&gt;<br />   81  &lt;ul class=&quot;p7TMM&quot;&gt;<br />   82    &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Root Menu Item&lt;/a&gt;<br />   83      &lt;div&gt;<br />   84        &lt;ul&gt;<br />   85          &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Menu Item&lt;/a&gt;&lt;/li&gt;<br />   86          &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Menu Item&lt;/a&gt;&lt;/li&gt;<br />   87          &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Menu Item&lt;/a&gt;&lt;/li&gt;<br />   88        &lt;/ul&gt;<br />   89      &lt;/div&gt;<br />   90    &lt;/li&gt;<br />   91    &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Root Menu Item&lt;/a&gt;<br />   92      &lt;div&gt;<br />   93        &lt;ul&gt;<br />   94          &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Menu Item&lt;/a&gt;&lt;/li&gt;<br />   95          &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Menu Item&lt;/a&gt;<br />   96            &lt;div&gt;<br />   97              &lt;ul&gt;<br />   98                &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Menu Item&lt;/a&gt;&lt;/li&gt;<br />   99                &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Menu Item&lt;/a&gt;&lt;/li&gt;<br />  100                &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Menu Item&lt;/a&gt;&lt;/li&gt;<br />  101              &lt;/ul&gt;<br />  102            &lt;/div&gt;<br />  103          &lt;/li&gt;<br />  104          &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Sub-Menu Item&lt;/a&gt;&lt;/li&gt;<br />  105          &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Sub-Menu Item&lt;/a&gt;&lt;/li&gt;<br />  106        &lt;/ul&gt;<br />  107      &lt;/div&gt;<br />  108    &lt;/li&gt;<br />  109    &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Root Menu Item&lt;/a&gt;<br />  110      &lt;div&gt;<br />  111        &lt;ul&gt;<br />  112          &lt;li&gt;&lt;a href=&quot;04carbon.htm&quot;&gt;Current Mark&lt;/a&gt;&lt;/li&gt;<br />  113          &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Menu Item&lt;/a&gt;&lt;/li&gt;<br />  114          &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Menu Item&lt;/a&gt;&lt;/li&gt;<br />  115        &lt;/ul&gt;<br />  116      &lt;/div&gt;<br />  117    &lt;/li&gt;<br />  118    &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Root Menu Item&lt;/a&gt;<br />  119      &lt;div&gt;<br />  120        &lt;ul&gt;<br />  121          &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Menu Item&lt;/a&gt;&lt;/li&gt;<br />  122          &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Menu Item&lt;/a&gt;&lt;/li&gt;<br />  123          &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Menu Item&lt;/a&gt;&lt;/li&gt;<br />  124        &lt;/ul&gt;<br />  125      &lt;/div&gt;<br />  126    &lt;/li&gt;<br />  127  &lt;/ul&gt;<br />  128  &lt;!--[if lte IE 6]&gt;<br />  129&lt;style&gt;.p7TMM04 .p7TMM, .p7TMM04 a, .p7TMM04 li {height:1%;}&lt;/style&gt;<br />  130&lt;![endif]--&gt;<br />  131  &lt;!--[if IE 5]&gt;<br />  132&lt;style&gt;.p7TMM04 a, .p7TMM04 a {overflow: visible !important;}&lt;/style&gt;<br />  133&lt;![endif]--&gt;<br />  134  &lt;script type=&quot;text/javascript&quot;&gt;<br />  135&lt;!--<br />  136P7_TMMop('p7TMM_1',3,0,0,3,1,1,1,0,-1,150);<br />  137//--&gt;<br />  138  &lt;/script&gt;</code><br /><br />As you can see, it wraps submenu &lt;ul&gt;'s in &lt;div&gt; tags (see, e.g., lines 83 &amp; 89, 92 &amp; 107, and 96 &amp; 102, above).<br /><br />I think I can add the first opening &lt;div&gt; by using the __hasChild function by using perhaps something like this which adds the div after the link if the category record has a child, for example this --<br /><br /><code>&lt;ul&gt;  <br />	&lt;li&gt;&lt;a href=&quot;?&quot;&gt;(All Articles)&lt;/a&gt;&lt;/li&gt; 	 <br />&lt;?php foreach ($categoriesRecords as $categoryRecord): ?&gt; <br />     &lt;?php echo $categoryRecord['_listItemStart'] ?&gt;  <br />           &lt;?php if ($categoryRecord['_hasChild']): ?&gt; <br />		&lt;a href=&quot;#&quot;&gt;&lt;?php echo $categoryRecord['name'] ?&gt;&lt;/a&gt; &lt;div&gt;<br />	  &lt;?php else: ?&gt;  <br />	  &lt;?php if ($categoryRecord['_isSelected']): ?&gt; &lt;b&gt; &lt;?php endif ?&gt;  <br />    	  &lt;a href=&quot;?category=&lt;?php echo $categoryRecord['num'] ?&gt;&quot;&gt;&lt;?php echo $categoryRecord['name'] ?&gt;&lt;/a&gt;  <br />      	  &lt;?php if ($categoryRecord['_isSelected']): ?&gt; &lt;/b&gt; &lt;?php endif ?&gt;  <br />      &lt;?php echo $categoryRecord['_listItemEnd'] ?&gt;  <br />&lt;?php endforeach ?&gt;  <br />&lt;/ul&gt;</code><br /><br />BUT I just can't figure out after wrestling with it a long time just how to add the ending &lt;/div&gt; tag.  Something using _isLastChild perhaps, but I just can't figure out the exact code needed.  And, it has to go after the &lt;/ul&gt; tag that CMSB seems to auto generate to end the sub menu &lt;ul&gt;'s inside the main &lt;ul&gt;.<br /><br />So, what I need is the code that will generate the category links in the format as per that used by the menu script I want to use as shown above that will add the necessary &lt;div&gt; and &lt;/div&gt; surrounding the &lt;ul&gt;&lt;/ul&gt; pairs that get generated for sub menus (and sub sub menus etc.).<br /><br />Thanks very much.<br />]]></description>
          <pubDate>Fri, 22 Jul 2011 02:00:21 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2212350#post2212350</guid>
        </item>
                <item>
          <title>Need Help with a Category Menu styling problem please</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2212349#post2212349</link>
          <description><![CDATA[Hi,<br /><br />I'd appreciate help with this problem I'm trying to solve now about category menu styling.<br /><br />By &quot;category menu&quot; I mean the list of links to categories that you can make appear on the web page you're designing.<br /><br />I'm working on a vertical navigation menu, that is generated by CMSB and outputs a vertical list of links to the CMSB categories.<br /><br />I want to make bold the selected category menu item link, and also make bold all of the ancestor parents of the selected category.  In other words, I want to make the link to the category that is the current selected category appear in bold, and, also have all its ancestor links appear in bold too.  I also want to do this in conjunction with having parent items in the category menu get rendered as null links.  I've tried many code permutations and searched this forum to no avail.<br /><br />Before explaining further, here's the base code I'm working off of and modifying to try to do the above is this code found in this forum:<br /><code>&lt;ul&gt; <br />	&lt;li&gt;&lt;a href=&quot;?&quot;&gt;(All Articles)&lt;/a&gt;&lt;/li&gt; 	<br />&lt;?php foreach ($categoriesRecords as $categoryRecord): ?&gt;<br />     &lt;?php echo $categoryRecord['_listItemStart'] ?&gt; <br />	  &lt;?php if ($categoryRecord['_isSelected']): ?&gt; &lt;b&gt; &lt;?php endif ?&gt; <br />    	  &lt;a href=&quot;?category=&lt;?php echo $categoryRecord['num'] ?&gt;&quot;&gt;&lt;?php echo $categoryRecord['name'] ?&gt;&lt;/a&gt; <br />      	  &lt;?php if ($categoryRecord['_isSelected']): ?&gt; &lt;/b&gt; &lt;?php endif ?&gt; <br />      &lt;?php echo $categoryRecord['_listItemEnd'] ?&gt; <br />&lt;?php endforeach ?&gt; <br />&lt;/ul&gt;</code><br /><br />So, I was able to use and adapt this base code to have CMSB generate null links for the parent items, using the code shown below.  The reason I wanted to learn how to do this is I think users will not realize that menu items that spawn drop downs that end in links are themselves clickable links, and to the user these type of menu items are more like headings rather than clickable menu links.  This seems especially true with hover menus.  So, I want any item in the category menu that is also a parent to just be a null link.  Here's the code I used to do this:<br /><br /><code>&lt;ul&gt; <br />	&lt;li&gt;&lt;a href=&quot;?&quot;&gt;(All Articles)&lt;/a&gt;&lt;/li&gt; 	<br />&lt;?php foreach ($categoriesRecords as $categoryRecord): ?&gt;<br />     &lt;?php echo $categoryRecord['_listItemStart'] ?&gt; <br />	  &lt;?php if ($categoryRecord['_hasChild']): ?&gt;<br />			&lt;a href=&quot;#&quot;&gt;&lt;?php echo $categoryRecord['name'] ?&gt;&lt;/a&gt;<br />	  &lt;?php else: ?&gt; <br />	      &lt;?php if ($categoryRecord['_isSelected']): ?&gt; &lt;b&gt; &lt;?php endif ?&gt; <br />    	      &lt;a href=&quot;?category=&lt;?php echo $categoryRecord['num'] ?&gt;&quot;&gt;&lt;?php echo $categoryRecord['name'] ?&gt;&lt;/a&gt; <br />      	      &lt;?php if ($categoryRecord['_isSelected']): ?&gt; &lt;/b&gt; &lt;?php endif ?&gt; <br />	&lt;?php endif ?&gt; <br />      &lt;?php echo $categoryRecord['_listItemEnd'] ?&gt; <br />&lt;?php endforeach ?&gt; <br />&lt;/ul&gt;</code><br /><br />That works great, and if a category item is a parent of other submenu items, the link for the parent item gets generated as a null link so it acts only as a text heading that's not a link.  This way, the menu item acts, as desired, only as a heading about the sub menu items it spawns and itself is not a clickable link since I don't want menu items that act as headings for sub items to have links attached to them.  <br /><br />OK, then, after getting the above right I wanted to also modify the base menu code I'm using to also make in bold the selected sub (or sub-sub) category menu item that is the currently selected one PLUS also all of its parent ancestors (and their parent ancestors).  The base code I'm using does put in bold the link to the current selected category but not all its ancestors.  <br /><br />So I was able to modify the base code I'm working off to make the link to the selected category and all its ancestors appear in bold AND generate a null link for the  ancestors of the selected category menu link, using this code:<br /><code>&lt;ul&gt; <br />	&lt;li&gt;&lt;a href=&quot;?&quot;&gt;(All Articles)&lt;/a&gt;&lt;/li&gt; 	<br />&lt;?php foreach ($categoriesRecords as $categoryRecord): ?&gt;<br />     &lt;?php echo $categoryRecord['_listItemStart'] ?&gt; <br />	  &lt;?php if ($categoryRecord['_isDescendantSelected']): ?&gt;<br />			&lt;b&gt; &lt;a href=&quot;#&quot;&gt;&lt;?php echo $categoryRecord['name'] ?&gt;&lt;/a&gt; &lt;/b&gt;<br />	  &lt;?php else: ?&gt; <br />	      &lt;?php if ($categoryRecord['_isSelected']): ?&gt; &lt;b&gt; &lt;?php endif ?&gt; <br />    	      &lt;a href=&quot;?category=&lt;?php echo $categoryRecord['num'] ?&gt;&quot;&gt;&lt;?php echo $categoryRecord['name'] ?&gt;&lt;/a&gt; <br />      	      &lt;?php if ($categoryRecord['_isSelected']): ?&gt; &lt;/b&gt; &lt;?php endif ?&gt; <br />	&lt;?php endif ?&gt; <br />      &lt;?php echo $categoryRecord['_listItemEnd'] ?&gt; <br />&lt;?php endforeach ?&gt; <br />&lt;/ul&gt;</code><br /><br />BUT, here's where I'm at a dead end and need help.  I can't seem to make BOTH things happen, i.e., [1] have links to category menu items that have sub items get generated as null (i.e.,#) links, AND ALSO [2] have all ancestor menu items of the selected category menu item appear in bold.  In other words, I can't find a way to combine both.  I can get it to do either 1 or 2 (as shown above) but can't find the code that does the trick to do both.<br /><br />I have tried the following code but it does not work in the sense that the parent menu items get generated with a null # link only if one of its descendants is selected.  If a parent menu item's sub child menu items are not selected, it will generate the regular category url link.  But what I want is (1) a category menu item that's a parent item should have a null # link, and (2) if a submenu item is the selected category, it AND all of its ancestors should appear in bold.<br /><br />I had thought that if I somehow could combine two conditions in an IF statement that might be an approach, i.e., IF item has descendants AND item's descendant is selected, THEN generate null link and make it bold if a descendant is selected.  But even writing this out now I can see that this logic is not right.  Here's the code I tried but can't get to work to do both things:<br /><br /><code>&lt;ul&gt; <br />	&lt;li&gt;&lt;a href=&quot;?&quot;&gt;(All Articles)&lt;/a&gt;&lt;/li&gt; 	<br />&lt;?php foreach ($categoriesRecords as $categoryRecord): ?&gt;<br />     &lt;?php echo $categoryRecord['_listItemStart'] ?&gt; <br />	  &lt;?php if ($categoryRecord['_hasChild'] &amp;&amp; $categoryRecord['_isDescendantSelected']): ?&gt;<br />			&lt;b&gt; &lt;a href=&quot;#&quot;&gt;&lt;?php echo $categoryRecord['name'] ?&gt;&lt;/a&gt; &lt;/b&gt;<br />	  &lt;?php else: ?&gt; <br />	      &lt;?php if ($categoryRecord['_isSelected']): ?&gt; &lt;b&gt; &lt;?php endif ?&gt; <br />    	      &lt;a href=&quot;?category=&lt;?php echo $categoryRecord['num'] ?&gt;&quot;&gt;&lt;?php echo $categoryRecord['name'] ?&gt;&lt;/a&gt; <br />      	      &lt;?php if ($categoryRecord['_isSelected']): ?&gt; &lt;/b&gt; &lt;?php endif ?&gt; <br />	&lt;?php endif ?&gt; <br />      &lt;?php echo $categoryRecord['_listItemEnd'] ?&gt; <br />&lt;?php endforeach ?&gt; <br />&lt;/ul&gt;</code><br /><br />So I'd very much appreciate if anyone could supply the code I could use so that each of these things will happen:<br /><br />1. A category menu item that's a parent item should always have a null # link.<br /><br />2. If a submenu item is the selected category, it AND all of its ancestors should appear in bold.<br /><br />Thank you very much!<br />]]></description>
          <pubDate>Fri, 22 Jul 2011 01:34:35 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2212349#post2212349</guid>
        </item>
              </channel>
    </rss>
  