Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • michaelsteip Friend
    #182413

    Hello,
    I am trying to get a custom Link on JA Side News on my website http://www.steip.at/testenvironment/test/final_draft/. I don’t want the Link to go to the article, I want it to go to an external Website.

    How do I do this?

    Thanks,
    Michael

    Luna Garden Moderator
    #473723

    Hi,
    To change the link of each item of JA Side News Module, there is a way in doing so. However, by doing this, every item article only redirect to one external link.
    please go to:

    templatesja_mixmazhtmlmod_jasidenewsdefault.php
    Find these lines:

    <div class="ja-slidenews-item">

    <?php if( $showimage ): ?>
    <?php echo $helper->renderImage ($item, $params, $descMaxChars, $iwidth, $iheight ); ?>
    <?php endif; ?>

    <div class="ja-item-content">
    <?php if (isset($item->date)) : ?>
    <span class="ja-createdate"><?php echo JHTML::_('date', $item->date, JText::_('DATE_FORMAT_LC4')); ?></span>
    <?php endif; ?>

    <h4 class="item-title">
    <a class="ja-title" href="<?php echo $item->link; ?>"><?php echo $helper->trimString( $item->title, $titleMaxChars );?></a>
    </h4>

    <?php if ($descMaxChars!=0) : ?>
    <p class="item-desc"><?php echo $helper->trimString( strip_tags($item->introtext), $descMaxChars); ?></p>
    <?php endif;?>

    <?php if( $showMoredetail ) : ?>
    <a class="readon" href="<?php echo $item->link; ?>"> <?php echo JTEXT::_("MORE_DETAIL"); ?></a>
    <?php endif;?>

    </div>

    Replace red text with your custom link

    dpchap015 Friend
    #478898

    Hi, i have a similar issue. I am using Mero template.
    Please see the image attached.
    I wish to redirect in the following way.

    10) No redirection
    11) Redirect to external link1.
    12) Redirect to external link2.

    How do i do this. As the post says this will redirect all the articles to the same External URL if i follow @luna Garden.


    1. 1
    stormid Friend
    #478910

    Hi,
    I have also a problem with JA Sidenews. When I push the more detail link, the text will appear under de module and not in a new window. How can I fix this…I just want to open my new article in a new window and not under my items. Please can you help me…


    1. Schermafbeelding-2013-01-08-om-11.55.39
    dpchap015 Friend
    #478916

    Is this possible.
    in the code editing suggested by @luna Garden
    [PHP]<h4 class=”item-title”>
    <a class=”ja-title” href=”<?php echo $item->link; ?>”><?php echo $helper->trimString( $item->title, $titleMaxChars );?></a>
    </h4>

    <?php if ($descMaxChars!=0) : ?>
    <p class=”item-desc”><?php echo $helper->trimString( strip_tags($item->introtext), $descMaxChars); ?></p>
    <?php endif;?>

    <?php if( $showMoredetail ) : ?>
    <a class=”readon” href=”<?php echo $item->link; ?>”> <?php echo JTEXT::_(“MORE_DETAIL”); ?></a>
    <?php endif;?>[/PHP]

    if i replace the code [PHP]<?php echo $item->link; ?>[/PHP] with a if statement and make it look somewhat like this=>

    if(article_id=1)
    redirect=”#”
    else
    if(article_id=2)
    redirect=”external link1″
    else
    if(article_id=3)
    redirect=”external link2″
    else
    redirect=”<?php echo $item->link; ?>”

    will this resolve my issue.?

    dpchap015 Friend
    #478917

    <em>@stormid 354072 wrote:</em><blockquote>Hi,
    I have also a problem with JA Sidenews. When I push the more detail link, the text will appear under de module and not in a new window. How can I fix this…I just want to open my new article in a new window and not under my items. Please can you help me…
    </blockquote>

    You can try changing this a little more
    <blockquote>Hi,
    To change the link of each item of JA Side News Module, there is a way in doing so. However, by doing this, every item article only redirect to one external link.
    please go to:
    Code:
    templatesja_mixmazhtmlmod_jasidenewsdefault.php
    Find these lines:
    Code:
    <div class=”ja-slidenews-item”>

    <?php if( $showimage ): ?>
    <?php echo $helper->renderImage ($item, $params, $descMaxChars, $iwidth, $iheight ); ?>
    <?php endif; ?>

    <div class=”ja-item-content”>
    <?php if (isset($item->date)) : ?>
    <span class=”ja-createdate”><?php echo JHTML::_(‘date’, $item->date, JText::_(‘DATE_FORMAT_LC4’)); ?></span>
    <?php endif; ?>

    <h4 class=”item-title”>
    <a class=”ja-title” href=”<?php echo $item->link; ?>”><?php echo $helper->trimString( $item->title, $titleMaxChars );?></a>
    </h4>

    <?php if ($descMaxChars!=0) : ?>
    <p class=”item-desc”><?php echo $helper->trimString( strip_tags($item->introtext), $descMaxChars); ?></p>
    <?php endif;?>

    <?php if( $showMoredetail ) : ?>
    <a class=”readon” href=”<?php echo $item->link; ?>”> <?php echo JTEXT::_(“MORE_DETAIL”); ?></a>
    <?php endif;?>

    </div>
    Replace red text with your custom link</blockquote>

    Try changing this line
    <a class="ja-title" href="<?php echo $item->link; ?>">
    to

    <a target="_new" class="ja-title" href="<?php echo $item->link; ?>">

    stormid Friend
    #478923

    No it doesn’t work…

    When I look at the demo site from JA_University the module works fine, but in my site it doesn’t…I don’t now why. I also use this module in anouther template (Mendozite) and I have the same problem there. Maybe I didn’t configure it right?

    Ninja Lead Moderator
    #479074

    <em>@stormid 354072 wrote:</em><blockquote>Hi,
    I have also a problem with JA Sidenews. When I push the more detail link, the text will appear under de module and not in a new window. How can I fix this…I just want to open my new article in a new window and not under my items. Please can you help me…
    </blockquote>
    I would need to take a closer look at your site. I tried to access this link on your attachment file but no success: cbkontwlkkel.tmp.remote.nl, please send me url on your site

    evacm Friend
    #488047

    Hi,
    I have the same problem as stormid. With JA Sidenews on Mixmaz template. Clicking the title the article appears under the whole module on the home page but not in a new layout with only the final article.
    Could you help me?
    Thank you.

    Ninja Lead Moderator
    #488126

    <em>@evacm 366515 wrote:</em><blockquote>Hi,
    I have the same problem as stormid. With JA Sidenews on Mixmaz template. Clicking the title the article appears under the whole module on the home page but not in a new layout with only the final article.
    Could you help me?
    Thank you.</blockquote>

    You can try this way

    In Joomla, if you want to view article individually, that article must be assigned to a menu item.

    Pls create a new menu item (or use an existing one) and assign article (or category that article belongs to) to this new menu item and also make sure that you don’t assign any module to this menu item.

    Let me know if it helps.

    evacm Friend
    #488165

    That was it.
    Thank you Ninja Lead.

    humerf Friend
    #516160

    <em>@Ninja Lead 366599 wrote:</em><blockquote>You can try this way

    In Joomla, if you want to view article individually, that article must be assigned to a menu item.

    Pls create a new menu item (or use an existing one) and assign article (or category that article belongs to) to this new menu item and also make sure that you don’t assign any module to this menu item.

    Let me know if it helps.</blockquote>

    Is there any way to link to an internal URL or a a category-overview?
    I want to use the look of mero-homepage-grid to link to 3 main-categories (K2) of main menu.
    See rudimentary screenshot

    This means, I cannot use Luna Gardens solution because I don’t want any Sidenews-content to be linked to one URL.
    http://www.joomlart.com/forums/topic/ja-side-news-redirect-to-custom-link/

    I would also not fear of messing around in code, because this would be a one-time-work.
    Or is it possible to use another module and just the look of JA Sidenews?
    I am not a pro, but I guess no!?

    thx for any help in advance.


    1. mero-homepagegrid
    Luna Garden Moderator
    #516277

    Hello,

    You can try this:
    1. Go to file:

    modulesmod_jasidenewshelper.php
    find this line:

    $item->link = urldecode(JRoute::_(K2HelperRoute::getItemRoute($item->id . ':' . urlencode($item->alias), $item->catid . ':' . urlencode($item->categoryalias))));
    then change to:

    $item->link = urldecode(JRoute::_(K2HelperRoute::getCategoryRoute($item->catid . ':' . urlencode($item->categoryalias))));

    $item->title = $item->categoryname;

    and find these lines:

    $item->link = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catslug));
    change to:

    $item->link = urldecode(JRoute::_(K2HelperRoute::getCategoryRoute($item->catid . ':' . urlencode($item->categoryalias))));
    $item->title = $item->categoryname;

    Those change will take affect to JA Sidenew on your site.
    2. go to file:
    templatesja_merohtmlmod_jasidenewssidenews_content.php
    Remove this line:

    <?php echo $helper->trimString( strip_tags($item->introtext), $descMaxChars); ?>

    Remember to back up your file before processing

    humerf Friend
    #516432

    thanks your answer!
    I’ll give it a try!

Viewing 14 posts - 1 through 14 (of 14 total)

This topic contains 14 replies, has 7 voices, and was last updated by  humerf 10 years, 10 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum