Itemid = 435 being added at the end of the page link

1

I'm using a photo gallery template. When you click on a photo in the list that appears, it opens a new page perfectly. But it does not create a new page, it adds to the current page.

I noticed that the URL entered Itemid = 435 at the end of each link. If I remove this element the page works fine again. Any ideas how to prevent this from happening?

The code is this:

**<form action="index.php?option=com_igallery&amp;view=category&amp;id=<?php echo $this->category->id; ?>&amp;Itemid=<?php echo $this->Itemid; ?>" method="post" name="ig_menu_pagination">**

<?php 
if(count($this->categoryChildren) != 0)
{
    ?>
    <div id="cat_child_wrapper<?php echo $this->uniqueid; ?>" class="cat_child_wrapper">
    <?php
    $counter = 0;
    $columns = $this->profile->columns == 0 ? count($this->categoryChildren) : $this->profile->columns;

    while( $counter < count($this->categoryChildren) )
    {
        for($i=0; $i<$columns; $i++)
        {
            if( isset($this->categoryChildren[$counter]) )
            {
                **$row = $this->categoryChildren[$counter];
                $link = JRoute::_('index.php?option=com_igallery&amp;view=category&amp;igid='.$row->id.'&amp;Itemid='.$this->Itemid);
                ?>**

                <div class="cat_child" style="width: <?php echo $row->menu_max_width; ?>px;">
                    **<h3 class="cat_child_h3">
                        <a href="<?php echo $link; ?>" class="cat_child_a">
                            <?php echo $row->name; ?>
                        </a>
                    </h3>**
    
asked by anonymous 16.05.2014 / 15:15

3 answers

1

If you want the link to open in a new tab / window replace:

<a href="<?php echo $link; ?>" class="cat_child_a">

by

<a href="<?php echo $link; ?>" target="_BLANK" class="cat_child_a">
    
17.05.2014 / 03:04
0

So this itemid is there for some reason, but it's still removed below.

$linkItemid = igUtilityHelper::getItemid($row->gallery_id);
$photoList[$i]->link = 'index.php?option=com_igallery&view=category&igid='.$row->gallery_id.'&image='.$row->ordering;
$photoList[$i]->target_blank = 0;
    
16.05.2014 / 15:36
0

So I understand you do not want the link to open with the Itemid parameter, so remove this parameter from your $link .

$link = JRoute::_('index.php?option=com_igallery&amp;view=category&amp;igid='.$row->id);
    
16.05.2014 / 18:34