-
AuthorPosts
-
jp Friend
jp
- Join date:
- April 2012
- Posts:
- 105
- Downloads:
- 14
- Uploads:
- 32
- Thanks:
- 32
- Thanked:
- 5 times in 2 posts
November 4, 2014 at 8:07 am #202421Good day
I would like the “department” module on main page to be 4 columns block as i only have 8 articles to put into that space
when i select 4 columns in the alternative layout in the article category the module does not display on pageI would also like the department page which displays the departments to line up in the blocks, it looks out of proportion if the blocks is not the same height
-
Ninja Lead Moderator
Ninja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
November 5, 2014 at 5:58 am #554216The four-columns of Alternative Layout in Articles Category can not support your expectations, but you can try to use my customization below
+ Open templates/ja_medicare/html/mod_articles_category/five-columns.php file
Find and change
<div class="category-module-item <?php if($count > 5): echo "border-top"; endif; ?> <?php if($count % 5 != 0): echo "border-right"; endif; ?>">
To
<div class="category-module-item <?php if($count > 4): echo "border-top"; endif; ?> <?php if($count % 4 != 0): echo "border-right"; endif; ?>">
+ Create templates/ja_medicare/css/custom.css file and add new rule
@media (min-width: 768px) {
.category-module.five-columns .category-module-item {
border: none;
width: 25%;
padding-top: 50px;
padding-bottom: 0;
}
}Let me know if it helps
1 user says Thank You to Ninja Lead for this useful post
jp Friendjp
- Join date:
- April 2012
- Posts:
- 105
- Downloads:
- 14
- Uploads:
- 32
- Thanks:
- 32
- Thanked:
- 5 times in 2 posts
November 26, 2014 at 9:29 am #556615Hey Ninja
I went a other way with the department slider
But still struggeling with the department page blocks… they should all be the same sizeRegards
JPNinja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
November 27, 2014 at 4:27 am #556753<em>@jptromp 454885 wrote:</em><blockquote>Hey Ninja
I went a other way with the department slider
But still struggeling with the department page blocks… they should all be the same sizeRegards
JP</blockquote>Try to use my solution above or you can pm me FTP account of your site. I will help you out.
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
December 2, 2014 at 8:36 am #557344<em>@jptromp 454885 wrote:</em><blockquote>Hey Ninja
I went a other way with the department slider
But still struggeling with the department page blocks… they should all be the same sizeRegards
JP</blockquote>I fixed the problem directly on your site because the text in Department module are very long, I wrote the cut_string function into templates/ja_medicare/html/com_content/category/department_item.php file for the purpose of stripping text
Beside that, I added new rule into templates/ja_medicare/css/custom.css file
.grid-view .item {
min-height: 350px;
}You can check it on your site, let me know if it helps
September 1, 2015 at 2:16 pm #747194Hi,
I have the same problem, could you help me how to write cut_string function?
Thanks
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
September 4, 2015 at 3:00 am #681583<em>@rovisco 490349 wrote:</em><blockquote>I don’t have permissions :(</blockquote>
I copied that function below
function cut_string($title, $max)
{
if($title!=''){
if(is_array($title)) list($string, $match_to) = $title;
else { $string = $title; $match_to = $title{0}; }$match_start = stristr($string, $match_to);
$match_compute = strlen($string) - strlen($match_start);if (strlen($string) > $max)
{
if ($match_compute < ($max - strlen($match_to)))
{
$pre_string = substr($string, 0, $max);
$pos_end = strrpos($pre_string, " ");
if($pos_end === false) $string = $pre_string."...";
else $string = substr($pre_string, 0, $pos_end)."...";
}
else if ($match_compute > (strlen($string) - ($max - strlen($match_to))))
{
$pre_string = substr($string, (strlen($string) - ($max - strlen($match_to))));
$pos_start = strpos($pre_string, " ");
$string = "...".substr($pre_string, $pos_start);
if($pos_start === false) $string = "...".$pre_string;
else $string = "...".substr($pre_string, $pos_start);
}
else
{
$pre_string = substr($string, ($match_compute - round(($max / 3))), $max);
$pos_start = strpos($pre_string, " "); $pos_end = strrpos($pre_string, " ");
$string = "...".substr($pre_string, $pos_start, $pos_end)."...";
if($pos_start === false && $pos_end === false) $string = "...".$pre_string."...";
else $string = "...".substr($pre_string, $pos_start, $pos_end)."...";
}$match_start = stristr($string, $match_to);
$match_compute = strlen($string) - strlen($match_start);
}return $string;
}else{
return $string ='';
}
}
With $title: string needs to trim
$max: Number characterUse it: cut_string($data, 50);
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
September 4, 2015 at 3:00 am #747446<em>@rovisco 490349 wrote:</em><blockquote>I don’t have permissions :(</blockquote>
I copied that function below
function cut_string($title, $max)
{
if($title!=''){
if(is_array($title)) list($string, $match_to) = $title;
else { $string = $title; $match_to = $title{0}; }$match_start = stristr($string, $match_to);
$match_compute = strlen($string) - strlen($match_start);if (strlen($string) > $max)
{
if ($match_compute < ($max - strlen($match_to)))
{
$pre_string = substr($string, 0, $max);
$pos_end = strrpos($pre_string, " ");
if($pos_end === false) $string = $pre_string."...";
else $string = substr($pre_string, 0, $pos_end)."...";
}
else if ($match_compute > (strlen($string) - ($max - strlen($match_to))))
{
$pre_string = substr($string, (strlen($string) - ($max - strlen($match_to))));
$pos_start = strpos($pre_string, " ");
$string = "...".substr($pre_string, $pos_start);
if($pos_start === false) $string = "...".$pre_string;
else $string = "...".substr($pre_string, $pos_start);
}
else
{
$pre_string = substr($string, ($match_compute - round(($max / 3))), $max);
$pos_start = strpos($pre_string, " "); $pos_end = strrpos($pre_string, " ");
$string = "...".substr($pre_string, $pos_start, $pos_end)."...";
if($pos_start === false && $pos_end === false) $string = "...".$pre_string."...";
else $string = "...".substr($pre_string, $pos_start, $pos_end)."...";
}$match_start = stristr($string, $match_to);
$match_compute = strlen($string) - strlen($match_start);
}return $string;
}else{
return $string ='';
}
}
With $title: string needs to trim
$max: Number characterUse it: cut_string($data, 50);
-
AuthorPosts
Viewing 12 posts - 1 through 12 (of 12 total)This topic contains 12 replies, has 3 voices, and was last updated by Ninja Lead 9 years, 3 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum