41
russtik
Need a smarty tag for module name
  • 2005/4/20 15:33

  • russtik

  • Just popping in

  • Posts: 70

  • Since: 2004/8/13


I'm currantly using <{$modname}> at the top of my centre column as a page title on a site I'm developing. This is obviously outputting a rather nonsensical word such os 'NewBB' where I would rather it display the name I appended the module as can be seen on the main menu. I've tried using the <{$module.name}> tag instead but this outputs the last name in the main menu only.

Can anyone provide a tag/method for achieving the above?

TIA.



42
russtik
Re: The incredible disappearing content trick
  • 2005/3/3 12:05

  • russtik

  • Just popping in

  • Posts: 70

  • Since: 2004/8/13


Hi yeah I've sorted the problem now...

As Rowdie pointed out the content of modules gets outputted at the location of <{$xoops_contents}>, I'd assumed it would displayed within $xoops_ccblocks which was the reason why I saw nothing when I navigated away from my home page (made up of blocks). I've since made a new template with my custom styling and the <{$xoops_contents}> tag which gets included when modules contents needs to be displayed. See this thread.

As for the tableless layout, it's been a lot of trial and error. For me this has consumed quite a bit of time in development. The site I'm working on is a 100% width, 3 column with a liquid centre(English UK spelling Wheeler ) column. I've tried numerous methods to get the specifications I was looking for but in the end adopted the BlueRobot 'Flanking Menus' layout which has proved to be stable cross browser/cross platform. It also has the added bonus of rendering the centre column before the left & right in the markup, which gives you extra SEO cred'. Here's the layout:

http://bluerobot.com/web/layouts/layout3.html

I'll post a link to the site I'm working on once it's finished

@fireguy: If you're thinking of going down the tableless/css layout route then you'd do well to choose XOOPS for your CMS. It's already xhtml and the smarty template system is great for getting control over the markup.



43
russtik
Re: Smarty logic help needed
  • 2005/2/22 18:54

  • russtik

  • Just popping in

  • Posts: 70

  • Since: 2004/8/13


I've no idea what went wrong the first time around

For sake of argument, the theme is in a folder called 'default' (it's actually called something else but I am renaming the path accordingly). Thanks for helping me out here, much appreciated.

Just gotta find a tag to output the module name now.



44
russtik
Re: Smarty logic help needed
  • 2005/2/22 18:35

  • russtik

  • Just popping in

  • Posts: 70

  • Since: 2004/8/13


Hold the phone !

I reverted the path back to the one I originally used (instead of <{$xoops_imageurl}>) and it's working a treat !

Thanks for all your help.




P.s. Mithrandir you were right in that 'Contact Us' is the last module in the list. Any idea how I can output the current module name as it is in the main menu (not it's folder name)?



45
russtik
Re: Smarty logic help needed
  • 2005/2/22 18:18

  • russtik

  • Just popping in

  • Posts: 70

  • Since: 2004/8/13


Rowdie,

Your suggestion works as far as excluding the template from the homepage, but upon navigating to a module it chokes. Taking a look at the source of the rendered page shows that it just stops at the point where I pasted your code.



46
russtik
Re: Smarty logic help needed
  • 2005/2/22 17:55

  • russtik

  • Just popping in

  • Posts: 70

  • Since: 2004/8/13


None of these approaches have worked I'm afraid.

Tried:

<{if $module eq 'system'}>
    <{
php}>echo "";<{/php}>
  <{else}>
    <{include 
file="default/theme_contentcenter.html"}>
  <{/if}>


and

<{if $xoops_contents}>
<{include 
file="default/theme_contentcenter.html"}>
<{/if}>


...to no avail

Mithrandir's suggestion produced a blank white page.



47
russtik
Smarty logic help needed
  • 2005/2/22 17:12

  • russtik

  • Just popping in

  • Posts: 70

  • Since: 2004/8/13


Hello all,

I'm working on a theme where I've removed the <{$xoops_contents}> tag and placed it in a separate template. The problem I am currently having is controlling when this gets displayed. I don't want this to be called when there is no module to display i.e. the home page. I've been experimenting with some variations around this:

<{if $thisPage == "system"}>
    <{echo 
"";}>
  <{else}>
    <{include 
file="default/theme_contentcenter.html"}>
  <{/if}>


This hasn't worked, it includes the template regardless. I'm only really stabbing the in dark, I don't even know if the syntax is right. Can anyone help shed some light onto this quandry?

Also:

In the template I've made (referenced above), I've used the <{$module.name}> tag for a title, but it only every returns 'Contact Us' in the browser irrespective of what module you're actually in. Anyone know why this might be?

TIA



48
russtik
Re: Theme templates disappearing...
  • 2005/2/18 17:41

  • russtik

  • Just popping in

  • Posts: 70

  • Since: 2004/8/13


Okay... I've figured it out, just to continue my little monologue for the sake of the archives here goes:



the content of the individual modules doesn't appear in a block and therefore bypasses the call to the block templates in the main theme.html, thus ignoring the code below:

<!-- Display center blocks if any -->
  <{if 
$xoops_showcblock == 1}>
            
  <
div class="centre">
    <!-- 
Start center-center blocks loop -->
    <{foreach 
item=block from=$xoops_ccblocks}>
    <{include 
file="default/theme_blockcenter_c.html"}>
    <{/foreach}>
    <!-- 
End center-center blocks loop -->
  </
div>

      <
div class="centreleft"
        <!-- 
Start center-left blocks loop -->
        <{foreach 
item=block from=$xoops_clblocks}> <{include file="default/theme_blockcenter_l.html"}> 
        <{/foreach}> 
        <!-- 
End center-left blocks loop -->
      </
div>
            
      <
div class="centreright"
        <!-- 
Start center-right blocks loop -->
        <{foreach 
item=block from=$xoops_crblocks}> <{include file="default/theme_blockcenter_r.html"}> 
        <{/foreach}> 
        <!-- 
End center-right blocks loop -->
      </
div>
            
  <{/if}>
  <!-- 
End center blocks if any -->


Seeing as I've compiled some custom background styles in the style.css that relate specifically to elements in the block templates, the custom background doesn't appear in the centre column when I navigate away from the home page.

Now in order to get my custom background visible across the board I've either got to force all the content to appear in a block, or somehow apply the element structure from the block templates to what ever gets spat out between:

< div id="content" >
<{$xoops_contents}>
< /div >

Hmmmm



49
russtik
Re: Theme templates disappearing...
  • 2005/2/18 12:34

  • russtik

  • Just popping in

  • Posts: 70

  • Since: 2004/8/13


Can no one tell me why theme_blockcenter_c.html, theme_blockcenter_l.html & theme_blockcenter_r.html only appear in the home page?




50
russtik
Theme templates disappearing...
  • 2005/2/3 15:33

  • russtik

  • Just popping in

  • Posts: 70

  • Since: 2004/8/13


I've got some modified theme templates (left, right, centre, centre-left, centre-right) with their own set of styles. They all appear on the top page but the centre ones disappear on any subsequent pages.

Does anyone know why this might be?





TopTop
« 1 2 3 4 (5) 6 7 »



Login

Who's Online

173 user(s) are online (110 user(s) are browsing Support Forums)


Members: 0


Guests: 173


more...

Donat-O-Meter

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

Latest GitHub Commits