Assigning <div> to %d and %b

Support forum dedicated to free and advanced Joomla content presentation module with various layout options and data sources support.
GK User
Wed Feb 23, 2011 2:20 pm
I'm using the postnote template for a website that I'm working on currently (www.changingplanet.co.uk/test) and this template uses a module called "MainBody" which shows a single Joomla post in a static format (please see the "Vestibulum vitae ligula nec." bit at the bottom left of the front page).

The problem with this method is that it doesn't update itself automatically when a new post is published in that particular category, so I'm aiming to replace it with the NewsShowPro module. I've now stripped out the various items of a post in the administration panel of the module and with CSS I can now start styling them.

However, I'm struggling with the date. In the admin panel of the module I've set for the date "%d %b", so it only shows the day and the month when the article was published. What I would like to do is split this up further and have each of them in a seperate div class, so I can style them seperately using CSS.

At the moment it places everthing within <div class="nsp_art">, but what I would like to have is have it place it instead in:

Code: Select all
<div class="nsp_art">
   <div class="date">
      <div class="day">%d - day</div>
      <div class="month">%b - month</div>
   </div>
   <div class="content">header, text, author, comments, readmore</div>
</div>


Now, I've looked inside the engine.js file as I assume this is where I need to change things, but given that I'm not a javascript programmer I'm a bit at a loss. Any ideas?
User avatar
Junior Boarder

GK User
Wed Feb 23, 2011 2:30 pm
I think I partially fixed it... out of desperation I do what I normally do, something that you think wouldn't work even if your life depended on it. So I basically changed the "date" field in the admin panel of the module to:

<div class="date"><div class="day">%d</div><div class="month">%b</div></div>

Which does create the divs as specified as above. It's a bit of a dirty hack, but it works apparently.

The only query I have now is, if it is possible to create a <div class="content"> that holds the other items such as header, image, text, author, comments, readmore?
User avatar
Junior Boarder


cron