[xwiki-users] Please Help with Navigational Panel Issue
Hello, I am experiencing some layout issues. I am using the right navigation panel. In the Blog WebHome Page, the right navigation panel is properly visible for some pages. However, for some pages, the right navigation panel either appears at the bottom or at the upper left corner of the page. I am having this problem only on the Blog WebHome page. I used a HTML validation tool, I still could not spot where the problem might be. I was wondering if you could help me with the code below so that the navigation panel will not display in different locations on the Blog WebHome page? Thank you for your time. Hande This is the code behind Blog.Macros: #macro(blog $category $nbitems $nbstart) #if(!$maxchars) #set($maxchars = 400) #end <div class="hfeed"> #if($category=='') #set ($sql = ", BaseObject as obj where obj.name=doc.fullName and obj.className='XWiki.ArticleClass' and obj.name<>'XWiki.ArticleClassTemplate' order by doc.creationDate desc") #else #set ($sql = ", BaseObject as obj, DBStringListProperty as prop join prop.list list where obj.name=doc.fullName and obj.className='XWiki.ArticleClass' and obj.name<>'XWiki.ArticleClassTemplate' and obj.id=prop.id.id and prop.id.name='category ' and list='${category}' order by doc.creationDate desc") ## TODO: feed category #end #set($cdate = "") #set($inbitems = $xwiki.parseInt($nbitems)) #set($inbstart = $xwiki.parseInt($nbstart)) #foreach ($item in $xwiki.searchDocuments($sql, $inbitems, $inbstart)) #set($bentrydoc = $xwiki.getDocument($item)) #if($bentrydoc.fullName == $item) #set($bentryobj = $bentrydoc.getObject("XWiki.ArticleClass ")) #set($creationDate = $xwiki.formatDate($bentrydoc.creationDate, "MMMM dd, yyyy")) #if($cdate!=$creationDate) <div class="article_date">$creationDate</div> #set ($cdate = $creationDate) #end <div class="hentry"> <h4 class="heading-1-1-1 entry-title">$bentrydoc.display("title","view", $bentryobj)</h4> <div class="article_content entry-summary"> #set($content = $bentrydoc.display("extract", "view", $bentryobj)) #if($content=="") #set($content = $bentrydoc.display("content", "view", $bentryobj)) #if($content.length()>400) #set($i = $content.lastIndexOf(" ", $maxchars)) #set($i = $i + 1) #set($content = "${content.substring(0,$i)} [...>${bentrydoc.fullName}]") #end #else #set($content = "${content} [...>${ bentrydoc.fullName}]") #end #set($Author = $bentrydoc.display("extract", "view", $bentryobj)) #if($Author=="") #set($Author = $bentrydoc.display("AuthorName", "view", $bentryobj)) #if($content.length()>400) #set($i = $Author.lastIndexOf(" ", $maxchars)) #set($i = $i + 1) #set($Author = "${Author.substring(0,$i)} [...>${bentrydoc.fullName}]") #end #else #set($Author = "${Author} [...>${ bentrydoc.fullName}]") #end #set($Year = $bentrydoc.display("extract", "view", $bentryobj)) #if($Year=="") #set($Year = $bentrydoc.display("YearInfo", "view", $bentryobj)) #if($Year.length()>400) #set($i = $Year.lastIndexOf(" ", $maxchars)) #set($i = $i + 1) #set($Year = "${Year.substring(0,$i)} [...>${bentrydoc.fullName}]") #end #else #set($Year = "${Year} [...>${ bentrydoc.fullName}]") #end #set($References = $bentrydoc.display("extract", "view", $bentryobj)) #if($References=="") #set($References = $bentrydoc.display("ReferencesInfo", "view", $bentryobj)) #if($References.length()>400) #set($i = $References.lastIndexOf(" ", $maxchars)) #set($i = $i + 1) #set($References = "${References.substring(0,$i)} [...>${bentrydoc.fullName }]") #end #else #set($References = "${References} [...>${bentrydoc.fullName}]") #end #set($URL = $bentrydoc.display("extract", "view", $bentryobj)) #if($URL=="") #set($URL = $bentrydoc.display("URLInfo", "view", $bentryobj)) #if($URL.length()>400) #set($i = $URL.lastIndexOf(" ", $maxchars)) #set($i = $i + 1) #set($URL = "${URL.substring(0,$i)} [...>${bentrydoc.fullName}]") #end #else #set($URL = "${URL} [...>${bentrydoc.fullName }]") #end ##Make the content visible or invisible 10-16-07 by Hande #if(($Author !="") && ($Year !="") || ($References !="") && ($URL !="")) <b>Author:</b> $bentrydoc.display("AuthorName","view", $bentryobj)<br> <b>Year:</b> $bentrydoc.display("YearInfo","view", $bentryobj)<br> <b>Reference:</b> $bentrydoc.display("ReferencesInfo","view", $bentryobj)<br> <b>URL:</b> $bentrydoc.display("URLInfo","view", $bentryobj)<br> #else ##set($content = $bentrydoc.display("content", "view", $bentryobj)) $bentrydoc.getRenderedContent($content) #end </div> ## entry-content <div class="article_footer"> #set($bcategories = $bentryobj.getProperty("category").value) Posted by <address class="author vcard">#userfn($bentrydoc.creator)</address> at <abbr class="published" title="#formatdateISO($bentrydoc.creationDate)">$xwiki.formatDate($bentrydoc.creationDate, "MMM dd, yyyy HH:mm")</abbr>#if($bcategories.size() > 0) in #foreach($bcategory in $bcategories)<a rel="tag" href="$xwiki.getURL(" Blog.Category", "view", "category=${bcategory}")">$bcategory</a> #end#end #if($bentrydoc.date != $bentrydoc.creationDate) | Modified by <address class="author vcard">#userfn($bentrydoc.author)</address> at <abbr class="updated" title="#formatdateISO($bentrydoc.date)">$xwiki.formatDate($bentrydoc.date, "MMM dd, yyyy HH:mm")</abbr> #end | [$bentrydoc.comments.size() Comment(s)>${ bentrydoc.fullName}?xpage=comments] | <a href="$bentrydoc.getURL("view")" rel="bookmark">Permalink</a> </div> ## article_footer </div> ## hentry #end #end ## prev/next links #if(($inbstart != 0) || ($velocityCount==$inbitems)) <div class="pagingLinks"> #if ($inbstart!=0) #set($iprev = $inbstart - $inbitems) <span class="prevPage">[Previous>$doc.name?nbstart=${iprev}]</span> #end #if($velocityCount==$inbitems) #set($inext = $inbstart + $inbitems) <span class="nextPage">[Next>$doc.name?nbstart=${inext}]</span> #end <span class="clear"></span> </div> ## pagingLinks #end </div> ## hfeed #end #blog($category $nbitems $nbstart)
Hande Aksac schrieb:
I am experiencing some layout issues. I am using the right navigation panel. In the Blog WebHome Page, the right navigation panel is properly visible for some pages. However, for some pages, the right navigation panel either appears at the bottom or at the upper left corner of the page. I am having this problem only on the Blog WebHome page.
It is a potential problem cutting off text after 400 chars:
<div class="article_content entry-summary"> #set($content = $bentrydoc.display("extract", "view", $bentryobj)) #if($content=="") #set($content = $bentrydoc.display("content", "view", $bentryobj)) #if($content.length()>400) #set($i = $content.lastIndexOf(" ", $maxchars)) #set($i = $i + 1) #set($content="${content.substring(0,$i)} [...>${bentrydoc.fullName}]")
In the first 400 chars there could be some tags left opened - while the closing tags appear in the rest of the text cut off. Does the problem persist if you add unformatted (!) content in the "Extract" field of each blog entry? Guido
Hande Aksac schrieb:
I am experiencing some layout issues. I am using the right navigation panel. In the Blog WebHome Page, the right navigation panel is properly visible for some pages. However, for some pages, the right navigation panel either appears at the bottom or at the upper left corner of the page. I am having this problem only on the Blog WebHome page.
It is a potential problem cutting off text after 400 chars:
<div class="article_content entry-summary"> #set($content = $bentrydoc.display("extract", "view", $bentryobj)) #if($content=="") #set($content = $bentrydoc.display("content", "view", $bentryobj)) #if($content.length()>400) #set($i = $content.lastIndexOf(" ", $maxchars)) #set($i = $i + 1) #set($content="${content.substring(0,$i)} [...>${bentrydoc.fullName}]")
In the first 400 chars there could be some tags left opened - while the closing tags appear in the rest of the text cut off. Does the problem persist if you add unformatted (!) content in the "Extract" field of each blog entry? Guido
Thank you for your help! I was able to solve the problem by increasing the char size. Thanks again. Hande On 11/10/07, G.Schoepp <[email protected]> wrote:
Hande Aksac schrieb:
I am experiencing some layout issues. I am using the right navigation panel. In the Blog WebHome Page, the right navigation panel is properly visible for some pages. However, for some pages, the right navigation panel either appears at the bottom or at the upper left corner of the page. I am having this problem only on the Blog WebHome page.
It is a potential problem cutting off text after 400 chars:
<div class="article_content entry-summary"> #set($content = $bentrydoc.display("extract", "view", $bentryobj)) #if($content=="") #set($content = $bentrydoc.display("content", "view", $bentryobj)) #if($content.length()>400) #set($i = $content.lastIndexOf(" ", $maxchars)) #set($i = $i + 1) #set($content="${content.substring(0,$i)} [...>${bentrydoc.fullName}]")
In the first 400 chars there could be some tags left opened - while the closing tags appear in the rest of the text cut off.
Does the problem persist if you add unformatted (!) content in the "Extract" field of each blog entry?
Guido
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
participants (2)
-
G.Schoepp -
Hande Aksac