close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Styling Dynamic Menu advice please

Thread began 8/20/2012 2:31 am by CraigR | Last modified 8/20/2012 12:32 pm by CraigR | 1396 views | 5 replies

Jason ByrnesWebAssist

an example of how to accompish this is line 51 - 69.

php:
<?php do { ?>

  <li class="parent"><a href="#" style="background-image:url(CSSMenuWriter/cssmw_images/plus.png)"><?php echo $row_menuwriter_ps4categories["CategoryName"]; ?></a>
    <?php
// MenuWriter Nested Filter Variable
$_POST["menuwriter_ps4categories1_CategoryID"] = $row_menuwriter_ps4categories["CategoryID"];
?>
    <?php
$MenuWriter_menuwriter_ps4categories1 
"-1";
if (isset(
$_POST['menuwriter_ps4categories1_CategoryID'])) {
  
$MenuWriter_menuwriter_ps4categories1 $_POST['menuwriter_ps4categories1_CategoryID'];
}
mysql_select_db($database_powerstore$powerstore);
$query_menuwriter_ps4categories1 sprintf("SELECT CategoryName, CategoryID, CategoryParent FROM ps4_categories WHERE CategoryParent=%s ORDER BY CategoryName ASC"GetSQLValueString($MenuWriter_menuwriter_ps4categories1"int"));
$menuwriter_ps4categories1 mysql_query($query_menuwriter_ps4categories1$powerstore) or die(mysql_error());
$row_menuwriter_ps4categories1 mysql_fetch_assoc($menuwriter_ps4categories1);
$totalRows_menuwriter_ps4categories1 mysql_num_rows($menuwriter_ps4categories1);
?>
    <ul class="level-1">
      <?php if ($totalRows_menuwriter_ps4categories1 0) { // Show if recordset not empty ?>




This needs to be rearranged so the menuwriter_ps4categories1 recordset is just after the do statement that starts the loop. and add an ifstatment for the inline style:

php:
<?php do { ?>

<?php
$MenuWriter_menuwriter_ps4categories1 
"-1";
if (isset(
$_POST['menuwriter_ps4categories1_CategoryID'])) {
  
$MenuWriter_menuwriter_ps4categories1 $_POST['menuwriter_ps4categories1_CategoryID'];
}
mysql_select_db($database_powerstore$powerstore);
$query_menuwriter_ps4categories1 sprintf("SELECT CategoryName, CategoryID, CategoryParent FROM ps4_categories WHERE CategoryParent=%s ORDER BY CategoryName ASC"GetSQLValueString($MenuWriter_menuwriter_ps4categories1"int"));
$menuwriter_ps4categories1 mysql_query($query_menuwriter_ps4categories1$powerstore) or die(mysql_error());
$row_menuwriter_ps4categories1 mysql_fetch_assoc($menuwriter_ps4categories1);
$totalRows_menuwriter_ps4categories1 mysql_num_rows($menuwriter_ps4categories1);
?>
  <li class="parent"><a href="#" <?php if ($totalRows_menuwriter_ps4categories1 0) { ?>style="background-image:url(CSSMenuWriter/cssmw_images/plus.png)<?php ?>"><?php echo $row_menuwriter_ps4categories["CategoryName"]; ?></a>
    <?php
// MenuWriter Nested Filter Variable
$_POST["menuwriter_ps4categories1_CategoryID"] = $row_menuwriter_ps4categories["CategoryID"];
?>
    <ul class="level-1">
      <?php if ($totalRows_menuwriter_ps4categories1 0) { // Show if recordset not empty ?>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...