Jump to content

CAPITAL LETTERS for some code


Recommended Posts

Hi friends

If i have this {{$lang.html.videos_by_tag_title}} 

and in english version is, for example: Videos Tagged with %tag%

and for example will become into "Videos Tagged with amateur couple" 

How could i transform the full tagname in capital letters?  (i want AMATEUR COUPLE)

Tried with %TAG% but dont works ;)

 

Thanks!

Link to comment
Share on other sites

The HTML title is displayed in header template like this:

<title>{{$page_title|mb_ucfirst|default:$lang.html.default_title}}</title>

You can try to replace mb_ucfirst with ucwords function:

<title>{{$page_title|ucwords|default:$lang.html.default_title}}</title>

But I think it doesn't support non-latin characters.

Link to comment
Share on other sites

I have a similar question —were you able to get this to work?  It concerns titles on my website, which display each word's first letter in capitals, example - "The Best Places To Visit In Canada 2024".

Here's the CSS snippet I've implemented for CSS styling:

h1, h2, h3, h4, h5, h6 {
  text-transform: capitalize;
}

This works only for the HTML - but not for search seo.  I can go in and manually edit each video's title, but its alot.


 

Link to comment
Share on other sites

It can be done via Smarty modifier when displaying a value from variable. For example for video title inside video_view block template the title is displayed like this:

<h1>{{$data.title}}</h1>

You can change it to this:

<h1>{{$data.title|ucwords}}</h1>

But this only works with English base letter, not working with other languages.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...