Page 1 of 1

underscore attribute in 'tags' tag does not work?

PostPosted: Sun Dec 26, 2010 4:13 am
by kakashka12345
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

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

PostPosted: Sun Dec 26, 2010 10:23 am
by Bob
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.

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

PostPosted: Mon Dec 27, 2010 3:00 am
by kakashka12345
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?

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

PostPosted: Mon Dec 27, 2010 4:05 pm
by Bob
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!

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

PostPosted: Mon Dec 27, 2010 4:45 pm
by Bob
Update: Fixed in revision 3347.

This fix will be in the upcoming 2.2.0 final.

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

PostPosted: Tue Dec 28, 2010 5:43 am
by kakashka12345
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

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

PostPosted: Tue Dec 28, 2010 2:14 pm
by Bob
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. ;-)

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

PostPosted: Wed Dec 29, 2010 2:45 am
by kakashka12345
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