- Posts: 3
COMMUNITY FORUM
Line break to k2 item title
- dimitris skourlis
-
Topic Author
- Offline
- New Member
Less
More
11 years 6 months ago - 11 years 6 months ago #118814
by dimitris skourlis
Line break to k2 item title was created by dimitris skourlis
Hello,
If could someone help, I ld appreciate so much!!!! I need to have line break to k2 item title.
For example:
We have the item title: I said hello!
I need to be like this:
I said
Hello!
K2 item title strips html tags and the only thing I ve found is   , but this does not work as I need. Is this possible? I am using the latest joomla 2.5.14 and the latest com_k2. Please help...
If could someone help, I ld appreciate so much!!!! I need to have line break to k2 item title.
For example:
We have the item title: I said hello!
I need to be like this:
I said
Hello!
K2 item title strips html tags and the only thing I ve found is   , but this does not work as I need. Is this possible? I am using the latest joomla 2.5.14 and the latest com_k2. Please help...
Please Log in or Create an account to join the conversation.
- Mohamed Abdelaziz
-
- Offline
- Platinum Member
- Joomla Developer
11 years 6 months ago #118815
by Mohamed Abdelaziz
Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store
Replied by Mohamed Abdelaziz on topic Re: Line break to k2 item title
Its possible that you insert a special string, like
for example, to be replaced by a line break whenever title is displayed.
Example:
1- Enter the title as: I said
Hello!
2- edit the item.php file and modify this code snippet:to be:
step 2 should be done in other files to display the title correctly.
The best solution will be to develop a plugin to replace display the title automatically with proper replacement.
for example, to be replaced by a line break whenever title is displayed.
Example:
1- Enter the title as: I said
Hello!
2- edit the item.php file and modify this code snippet:
<?php echo $this->item->title; ?>
<?php echo str_replace("[br]","</br>"$this->item->title); ?>
step 2 should be done in other files to display the title correctly.
The best solution will be to develop a plugin to replace display the title automatically with proper replacement.
Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store
Please Log in or Create an account to join the conversation.
- dimitris skourlis
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 3
11 years 6 months ago #118816
by dimitris skourlis
Replied by dimitris skourlis on topic Re: Line break to k2 item title
Thank you for the quick response!
Nothing changed with this. Is any other way to get his done please? I ve some titles that are really huge...
Nothing changed with this. Is any other way to get his done please? I ve some titles that are really huge...
Please Log in or Create an account to join the conversation.
- Mohamed Abdelaziz
-
- Offline
- Platinum Member
- Joomla Developer
11 years 6 months ago #118817
by Mohamed Abdelaziz
Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store
Replied by Mohamed Abdelaziz on topic Re: Line break to k2 item title
The above example is for the item.php file, you need to apply it to category_item.php or latest_item.php as well.
Which view have you tested?
Which view have you tested?
Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store
Please Log in or Create an account to join the conversation.
- dimitris skourlis
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 3
11 years 6 months ago #118818
by dimitris skourlis
Replied by dimitris skourlis on topic Re: Line break to k2 item title
I tested to in a specific item page...is this wrong?
Please Log in or Create an account to join the conversation.
- Tomasz Pieta
-
- Offline
- New Member
10 years 10 months ago #118819
by Tomasz Pieta
Replied by Tomasz Pieta on topic Re: Line break to k2 item title
The exact way i used the code and works is
So in my K2 item title when i need a break i use this custom tag
I inserted this in category_item.php because this is where i needed that
<?php echo str_replace("[br]","<br>",$this->item->title); ?>
So in my K2 item title when i need a break i use this custom tag
I inserted this in category_item.php because this is where i needed that
Please Log in or Create an account to join the conversation.