1
Francesca
How to show subcats in SiteMap
  • 2006/12/26 13:24

  • Francesca

  • Just popping in

  • Posts: 9

  • Since: 2006/5/14


Hello, I installed SiteMap 1.26 on XOOPS 2.0.15 and I show subcategories with nested and ordered lists, just like that:
<{if $module.name}>
    <
h2><class="menuMain" href="<{$xoops_url}>/modules/<{$module.directory}>/"><{$module.name}></a></h2>
       <
ul>
    <{foreach 
item=parent from=$module.parent}>
      <
li><class="menuSub" href="<{$xoops_url}>/modules/<{$module.directory}>/<{$parent.url}>"><{$parent.title}></a>
      <{if 
$show_subcategoris}>
      <
ul>
      <{foreach 
item=child from=$parent.child}>
        <
li><class="menuSub" href="<{$xoops_url}>/modules/<{$module.directory}>/<{$child.url}>"><{$child.title}></a></li>
      <{/foreach}>
      </
ul></li>
      <{/if}>

    <{/foreach}>
    </
ul>

But I need to make it so that - if there are no subcats - the empty list <ul></ul> doesn't appear.

Any help?
Thank you.



2
Francesca
Subcategories in Sitemap
  • 2006/10/15 10:34

  • Francesca

  • Just popping in

  • Posts: 9

  • Since: 2006/5/14


Hello, I installed Sitemap on XOOPS 2.0.15 and I use this HTML code to display the map with nested lists:
<{if $module.name}>
    <
h2><class="menuMain" href="<{$xoops_url}>/modules/<{$module.directory}>/"><{$module.name}></a></h2>
       <
ul>
    <{foreach 
item=parent from=$module.parent}>
      <
li><class="menuSub" href="<{$xoops_url}>/modules/<{$module.directory}>/<{$parent.url}>"><{$parent.title}></a>
      <{if 
$show_subcategoris}>
      <
ul>
      <{foreach 
item=child from=$parent.child}>
        <
li><class="menuSub" href="<{$xoops_url}>/modules/<{$module.directory}>/<{$child.url}>"><{$child.title}></a></li>
      <{/foreach}>
      </
ul></li>
      <{/if}>

But, if there are no subcategories I end up having empty sub-lists.
What can I do about that?
I'd need to show the nested <ul> only where there actually are subcategories..

Thank you in advance.



3
Francesca
News 1.44 - problems w/ submitting form
  • 2006/8/29 21:13

  • Francesca

  • Just popping in

  • Posts: 9

  • Since: 2006/5/14


Hello,
I just noticed that a user with submit permission (and not admin rights) in News 1.44 sees this form
Resized Image
and not the complete one with the two text-areas (abstract and full news) or the various options at the bottom.
The bottom "disable HTML" is not avaliable and the articles gets submitted just like if "disable HTML" was activate, this causes that the articles shows tags because they don't get parsed.

Any help? Thanx a lot.



4
Francesca
Re: block title
  • 2006/8/24 14:50

  • Francesca

  • Just popping in

  • Posts: 9

  • Since: 2006/5/14


Quote:

Herko Coomans wrote:
I still don't get why you hardcode the block titles in the template files.

If I don't want a block title, I empty the block title in the block admin, and then it won't show.


As I said in previous post, I don't want blocks with empty titles in the admin. It's more difficoult to recognize them..



5
Francesca
Re: block title
  • 2006/8/16 14:07

  • Francesca

  • Just popping in

  • Posts: 9

  • Since: 2006/5/14


solved.
<{if $block.title =="Recent news"}>
<
div id="newshome">
<
h1><{$block.title}></h1>
<{
$block.title}>
</
div>
<{elseif 
$block.title|truncate:5:"" == "invis"}>
<{
$block.content}>
<{else}>
<
h1><{$block.title}></h1>
<{
$block.content}>
<{/if}>



6
Francesca
Re: block title
  • 2006/8/15 18:12

  • Francesca

  • Just popping in

  • Posts: 9

  • Since: 2006/5/14


Why the method doesn't work with the "Recent news" block of the default news module?

If I name it "invis-Recent news" all the entire block doesn't appear anymore. And after renaming it "Recent news" I have to update the module to make it appear again...

why?

It's just that I need to use this structure:

<div id="recentnews">
<
h1>Recent news</h1>
<
block content...>
</
div>


and to make it I need to not show the default block.title otherwise the recent news would show like:
<h1>Recent news</h1>
<
div id="recentnews">
block content...>
</
div>


according to the theme_blockcenter_c.html template
<{if $block.title|truncate:5:"" == "invis"}>
<{
$block.content}>
<{else}>
<
h1><{$block.title}></h1>
<{
$block.content}>
<{/if}>


so I have to add <h1>Recent news</h1> directly in news_block_top.html hard-coding it (hiding the $block.title).



7
Francesca
Re: block title
  • 2006/8/15 17:06

  • Francesca

  • Just popping in

  • Posts: 9

  • Since: 2006/5/14


sounds very interesting, thanks!

[EDIT] That topic has been very useful, I'm going to use this code
<{if $block.title|truncate:5:"" == "invis"}>
<{
$block.content}>
<{else}>
<
h1><{$block.title}></h1>
<{
$block.content}>
<{/if}>



8
Francesca
Re: block title
  • 2006/8/15 16:20

  • Francesca

  • Just popping in

  • Posts: 9

  • Since: 2006/5/14


yeah, I already considered the idea of not naming blocks but I would end up having too much blocks with no name and it's not very handy.

Quote:

<if $block.title !="">
    <
div class="blockTitle"><{$block.title}></div>
  </if>


Thanx, this will be very useful if I decide to go with empty names.



9
Francesca
block title
  • 2006/8/15 9:14

  • Francesca

  • Just popping in

  • Posts: 9

  • Since: 2006/5/14


hello,
what if I need to not always show block titles?
I tried deleting
<h1><{$block.title}></h1>
from (for example) theme_blockcenter_c.html and adding
<{$block.title}>
in the modules templates where I need to show the block title (for example news_block_top.html) but the variable isn't parsed and I don't get the block title.

Any help? thanks in advance.




TopTop



Login

Who's Online

235 user(s) are online (151 user(s) are browsing Support Forums)


Members: 0


Guests: 235


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits