-
AuthorPosts
-
September 19, 2011 at 3:02 pm #168724
Please, I will like to make all content articles to be Sentence cases. That is: if any user creates a new article and enters the title as “new article of the day”…. When they save the article, I want the title to change to “New Article Of The Day”… Is this possible?
jneubauer Friendjneubauer
- Join date:
- August 2011
- Posts:
- 141
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 4
- Thanked:
- 23 times in 23 posts
September 19, 2011 at 3:57 pm #413636As far as I know, that is not possible – the structure is totally dependant on the input.
This is a core Joomla! problem though, so you might check forum.joomla.org to see if someone has found a workaround or “hack” to do something similar.September 19, 2011 at 4:03 pm #413637Thanks. let me check over there
September 19, 2011 at 4:07 pm #413639I found one that changes it to UPPERCASE. Let me dig in some more and see if i can find one that changes it to Sentence case
In this case open the /components/com_content/content.html.php file and look for the Title function. In my case this is 617th line. In this function you can see the following line twice:
Code:
<?php echo $row->title;?>Change both of them to:
Code:
<?php echo(strtoupper($row->title));?>September 19, 2011 at 4:08 pm #413640I found another one. I dont know which one to choose now
Sorry to post again – this can be done much easier with CSS
text-transform:capitalize
or
text-transform:uppercase
Add it to the .contentheading section of your template_css.css
You should try to aviod changing the core files if possible!
jneubauer Friendjneubauer
- Join date:
- August 2011
- Posts:
- 141
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 4
- Thanked:
- 23 times in 23 posts
September 19, 2011 at 4:09 pm #413641perfect!
Try implementing that, and change the word strtoupper to ucwords
http://php.net/manual/en/function.strtoupper.php
http://www.php.net/manual/en/function.ucwords.phpjneubauer Friendjneubauer
- Join date:
- August 2011
- Posts:
- 141
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 4
- Thanked:
- 23 times in 23 posts
September 19, 2011 at 4:10 pm #413642regarding the css method – which Joomla! version are you using?
September 19, 2011 at 11:09 pm #413733Using Joomla 1.5.23
September 19, 2011 at 11:16 pm #413735Could not implement the first one becuase I cant find this file: /components/com_content/content.html.php
-
AuthorPosts
This topic contains 10 replies, has 3 voices, and was last updated by n6rej 13 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum