1
filesiteguy
How to update a block template?

I'm sure there must be an easier way to do this so I am asking here.

On my site I have some articles. I am using the XOOPS Article system. (I had tried the AMS one but it was too complicated.)

Anyway, I wanted to display just the title and description on my front page. Looking at the template, I saw that the articles_block_latest_main.php and *.htm files would be most suitable.

It was currently showing the article text, but that was wierd because it wouldn't parse the PHPbb code or the HTML, so I was getting funky text. I figured I'd prefer to just show the article description.

I looked at the .php file and found the section where it assigned variables. I added one for $description and a property $arts.description. I then updated the HTML and did a brief test of the display. All looked well. Then I uploaded to my host.

Nothing happened.

I tried a different browser. Nothing happened. I cleared my templates_c directory. Nothing happened. I then went into the templates Admin section and saw that there was no change. In fact, the file hadn't been updated since I uploaded the website.

I then pointed to http://www.perfectreign.com/modules/articles/templates/blocks/articles_block_latest_main.html to be sure it was there. It was.

Finally out of frustration, I decided to browse through the database to see if by chance the template was listed there. I eventually found it in a table called _tplsource. It turns out to be there. So I edited the table directly and again cleared my templates_c directory.

finally I have what I want.

What should I have done? Isn't there an easier method to this?

2
Mithrandir
Re: How to update a block template?

updating the module will refresh the database content from the template files in a module.

3
pegasus00321
Re: How to update a block template?

Side Comment:
I really dont like how it stores it in the DB, I mean why not just use the templates_c folder for caching it.

Login

Who's Online

448 user(s) are online (72 user(s) are browsing Support Forums)


Members: 0


Guests: 448


more...

Donat-O-Meter

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

Latest GitHub Commits