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

Asked

Viewed 94 times

1

I am using a photo gallery template. Clicking on a photo in the list that is displayed opens a new page perfectly well. But does not create a new page, add to the current page.

I have noticed that the URL has incorporated Itemid = 435 at the end of each link. If I remove this element the page works well again. Any idea 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>**

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">

for

<a href="<?php echo $link; ?>" target="_BLANK" class="cat_child_a">
  • i want to remove Itemid = 435 that appears at the end of the link.

  • Then change "$link = Jroute::('index.php? option=com_igallery&amp;view=category&amp;igid='. $Row->id. '&amp;Itemid='. $this->Itemid);" to "$link = Jroute::('index.php? option=com_igallery&amp;view=category&amp;igid='. $Row->id);"

0

So this Itemid is there for some reason, but follows below removed.

$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;
  • sorry but it didn’t work out

  • that code I sent you didn’t work.

  • I edited my question.

0

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

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.