Extra <br /> tags in categories plugin

Creating and modifying plugins.
Post Reply
oxy8384
Posts: 3
Joined: Sat Apr 21, 2007 2:26 am

Extra <br /> tags in categories plugin

Post by oxy8384 »

:?:
In my categories plugin template file, I have this:

Code: Select all

    <div class="category_link_all"><a href="{$form_url}?frontpage" title="{$CONST.ALL_CATEGORIES}">{$CONST.ALL_CATEGORIES}</a></div>
but when I load my blog and view source, I get this:

Code: Select all

<div class="category_link_all"><br /><a href="/s9y/index.php?frontpage" title="All categories">All categories</a></div>
Where is that <br /> coming from (between the opening <div> and the <a> tag)? There's another generated between the category list and the submit button.

Help, please!

Thanks in advance,

Bill
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Extra <br /> tags in categories plugin

Post by garvinhicking »

Hi!

The categories plugin by default does not use Smarty templating. You must explicitly enable this in the plugin's configuration.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
oxy8384
Posts: 3
Joined: Sat Apr 21, 2007 2:26 am

Post by oxy8384 »

Garvin,
Hmmmm... That's very strange, because SOMETHING is obviously interpreting the stuff in curly braces (isn't that the Smarty templating)? So, doesn't that mean the Smarty templating is turned on? (Though I don't remember turning this on...)

In either case, I'm confused. Please explain how what you're talking about can cause these extra line-break tags to appear.

??????? :?

Thanks,

Bill
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

The plugin has both a smarty-driven output and an internal driven output. If you don't enable Smarty-Templating in the plugins' config, internal output is used and the .tpl is not parsed at all. It's all PHP+HTML code emitted then, all changes to that would need to be made in the include/plugins_internal.inc.php file.

So turn on smarty templating, then you can edit the .tpl file and remove what you don'T want.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
oxy8384
Posts: 3
Joined: Sat Apr 21, 2007 2:26 am

Doh!

Post by oxy8384 »

Now, I get it.

Thanks!
Post Reply