1
arrakis
Cannot modify news template, changes are ignored
  • 2007/10/18 7:16

  • arrakis

  • Just popping in

  • Posts: 50

  • Since: 2004/10/1


Hi all,

I am trying to edit news_block_top.html to fix some visualization problem.

As admin I go to blocks > edit > edit template.

When I add or change something there, and then I go to the home page > reload > view source, nothing changed.

Even if I delete part of the code I still see it from the html in the home page, but as same time I see my modification on the template file, very strange.

As information: I cloned the template set and I set the new one as default on the preferences.

How can that be possible?

Thanks in advance for any useful suggestion.

2
Anonymous
Re: Cannot modify news template, changes are ignored
  • 2007/10/18 7:34

  • Anonymous

  • Posts: 0

  • Since:


Did you go to Admin>Preferences and set the option to check for new templates?

HTH

3
stefan88
Re: Cannot modify news template, changes are ignored
  • 2007/10/18 7:38

  • stefan88

  • Community Support Member

  • Posts: 1086

  • Since: 2004/9/20


Hi,

try to clear the templates_c folder - delete all files in it, except index.html!

as alternative you can:

1) change the file for the template and update module. again you may need to clear the templates_c

2) if you are using some of the 2.0.14 up to 2.0.17.1 versions, you may try template override option. There was an article in the news somwherehow to use it ...

..

4
arrakis
Re: Cannot modify news template, changes are ignored
  • 2007/10/18 8:31

  • arrakis

  • Just popping in

  • Posts: 50

  • Since: 2004/10/1


JAVesey: yes I had it "on".

stefan88: thanks for the suggestions, i deleted the files in template_c but no result, the other are too complicated solutions, I would just like to change the template and make it work.

I like XOOPS very much but sometimes you get lost in such stupid things that you never imagine they couldn't work.

Thank you guys for suggestions

5
MadFish
Re: Cannot modify news template, changes are ignored
  • 2007/10/18 9:48

  • MadFish

  • Friend of XOOPS

  • Posts: 1056

  • Since: 2003/9/27


Try modifying news_block_new.html instead.

I know it says that each block has its own template, but the top/new story blocks both actually use the same template. That's why your edits don't show up. Tricky eh?

If you wanted to have separate templates you might be able to fix it by making the following modification in news/xoopsversion.php - I haven't actually tried this (see red):

$modversion['blocks'][4]['file'] = "news_top.php";
$modversion['blocks'][4]['name'] = _MI_NEWS_BNAME5;
$modversion['blocks'][4]['description'] = "Shows recent articles";
$modversion['blocks'][4]['show_func'] = "b_news_top_show";
$modversion['blocks'][4]['edit_func'] = "b_news_top_edit";
$modversion['blocks'][4]['options'] = "published|10|25|0|0|0|0||1||||||";
$modversion['blocks'][4]['template'] = 'news_block_[b][color=FF0000]new[/color][/b].html';

6
arrakis
Re: Cannot modify news template, changes are ignored
  • 2007/10/18 11:21

  • arrakis

  • Just popping in

  • Posts: 50

  • Since: 2004/10/1


Quote:

MadFish wrote:
Try modifying news_block_new.html instead.

I know it says that each block has its own template, but the top/new story blocks both actually use the same template. That's why your edits don't show up. Tricky eh?




I can't believe I spent half day getting mad after that block, and it wasn't the right one, even if it is directly linked to from the block edit page

Now I was able to change it. Thank you very much!

Login

Who's Online

224 user(s) are online (159 user(s) are browsing Support Forums)


Members: 0


Guests: 224


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