underscore attribute in 'tags' tag does not work?

Get help with installation and running PivotX 2.0.x here. Please do not post Extension or Theme related questions here.

underscore attribute in 'tags' tag does not work?

Postby kakashka12345 » Sun Dec 26, 2010 4:13 am

Hello there pivotx'ers.

As can be seen from the subject of the current post my inquiry about "underscore" attribute.

I have made a blog post with tags:
first+tag second+tag third+tag.

When post was saved and posted, the tags were transformed (as expected) to: first_tag second_tag third_tag.
I decided to get rid of the "_" and after going through the doco, I discovered that I can use underscore attrib when using [[tags]].

So I have done it in my theme template wherever I use tags: [[tags underscore=" "]] . I cleaned up the cache, rebuilt the indexes, but unfortunately the "_" still remains in the generated tags ...

Please advise, what am I missing?

Regards,
kakashka12345
kakashka12345
 
Posts: 10
Joined: Sun Dec 26, 2010 4:01 am

Re: underscore attribute in 'tags' tag does not work?

Postby Bob » Sun Dec 26, 2010 10:23 am

What version of PivotX are you using? This parameter was added very recently, so update to PivotX 2.2 rc, if you haven't done so yet.
Bob
Lead Developer
 
Posts: 1374
Joined: Tue Nov 20, 2007 11:16 pm

Re: underscore attribute in 'tags' tag does not work?

Postby kakashka12345 » Mon Dec 27, 2010 3:00 am

Bob wrote:What version of PivotX are you using? This parameter was added very recently, so update to PivotX 2.2 rc, if you haven't done so yet.


Hi Bob,

I am using version 2.1.2. I had to tweak module_tags.php, module_snippets.php and module_smarty.php in order to achieve what I wanted :) I will give 2.2rc a go.

Cheers


Update: I had a look at smarty_tags() in module_smarty.php, v2.2rc. I cannot see anything that suggests that "underscore" parameter is used.
It is only used in smarty_tagcloud() which renders the [[tagcloud]] tag.

Any particular reason why smarty_tt() [[tt]] and smarty_tags() [[tags]] are not using the param also?
kakashka12345
 
Posts: 10
Joined: Sun Dec 26, 2010 4:01 am

Re: underscore attribute in 'tags' tag does not work?

Postby Bob » Mon Dec 27, 2010 4:05 pm

Any particular reason why smarty_tt() [[tt]] and smarty_tags() [[tags]] are not using the param also?


No particular reason, just an oversight, i think. I'll add it to those two tags before 2.2 final comes out. Thanks!
Bob
Lead Developer
 
Posts: 1374
Joined: Tue Nov 20, 2007 11:16 pm

Re: underscore attribute in 'tags' tag does not work?

Postby Bob » Mon Dec 27, 2010 4:45 pm

Update: Fixed in revision 3347.

This fix will be in the upcoming 2.2.0 final.
Bob
Lead Developer
 
Posts: 1374
Joined: Tue Nov 20, 2007 11:16 pm

Re: underscore attribute in 'tags' tag does not work?

Postby kakashka12345 » Tue Dec 28, 2010 5:43 am

Hi bob ,thanks for that. I have also added param "limit" for [[introduction]] to limit the char length. This is useful if you want to use the intro in meta description. Do you think this can be added to the trunk? Sorry for posting it here
kakashka12345
 
Posts: 10
Joined: Sun Dec 26, 2010 4:01 am

Re: underscore attribute in 'tags' tag does not work?

Postby Bob » Tue Dec 28, 2010 2:14 pm

If I use a shortened intro, title or body, I prefer to keep it inside the templates, for maintainability:

Code: Select all
[[ introduction|strip_tags|trimlen:65 ]]


No need for a change in the core files for that. ;-)
Bob
Lead Developer
 
Posts: 1374
Joined: Tue Nov 20, 2007 11:16 pm

Re: underscore attribute in 'tags' tag does not work?

Postby kakashka12345 » Wed Dec 29, 2010 2:45 am

Bob wrote:If I use a shortened intro, title or body, I prefer to keep it inside the templates, for maintainability:

Code: Select all
[[ introduction|strip_tags|trimlen:65 ]]


No need for a change in the core files for that. ;-)


Bob, that helped.

Cheers
kakashka12345
 
Posts: 10
Joined: Sun Dec 26, 2010 4:01 am


Return to 2.x Support Forum

Who is online

Users browsing this forum: No registered users and 3 guests

cron