Uploaded image for project: 'Apache Roller'
  1. Apache Roller
  2. ROL-1845

Improve weblog.vm to allow clicking on the current theme

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0
    • Component/s: Themes and Macros
    • Labels:
      None

      Description

      Current:

          • Show weblog's categories in specified parent category.
            *#
            #macro(showWeblogCategoryLinksList $categoryObject $subcats $expanding )
            #if ($expanding) #_showCommonJavascript() #end
            #if(!$expanding && !$subcats)
            <ul class="rCategory">
            #if ($model.weblogCategory)
            <li><a href="$url.category($categoryObject.path)">$text.get("macro.weblog.allcategories")</a></li>
            #else
            <li class="selected">$text.get("macro.weblog.allcategories")</li>
            #end
            #set($cats = $categoryObject.getWeblogCategories())
            #foreach($cat in $cats)
            #if($model.weblogCategory && $model.weblogCategory.path == $cat.path)
            <li class="selected">$cat.name</li>
            #else
            <li><a href="$url.category($cat.path)">$cat.name</a></li>
            #end
            #end
            </ul>
            #else
            <ul class="rCategory">
            #_showWeblogCategoryLinksList($categoryObject $subcats $expanding )
            </ul>
            #end
            #end

      Suggested improved version:

          • Show weblog's categories in specified parent category.
            *#
            #macro(showWeblogCategoryLinksList $categoryObject $subcats $expanding )
            #if ($expanding) #_showCommonJavascript() #end
            #if(!$expanding && !$subcats)
            <ul class="rCategory">
            #if ($model.weblogCategory || $model.permalink)
            <li><a href="$url.category($categoryObject.path)">$text.get("macro.weblog.allcategories")</a></li>
            #else
            <li class="selected"><a href="$url.category($categoryObject.path)">$text.get("macro.weblog.allcategories")</a></li>
            #end
            #set($cats = $categoryObject.getWeblogCategories())
            #foreach($cat in $cats)
            #if ($model.weblogCategory && $model.weblogCategory.path == $cat.path || ($model.permalink && $model.weblogEntry.category.path == $cat.path))
            <li class="selected"><a href="$url.category($cat.path)">$cat.name</a></li>
            #else
            <li><a href="$url.category($cat.path)">$cat.name</a></li>
            #end
            #end
            </ul>
            #else
            <ul class="rCategory">
            #_showWeblogCategoryLinksList($categoryObject $subcats $expanding )
            </ul>
            #end
            #end

        Attachments

        1. weblog.vm.patch
          4 kB
          Matt Raible

          Activity

            People

            • Assignee:
              mraible Matt Raible
              Reporter:
              mraible Matt Raible
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: