Main menu

Forum


[SOLVED] Link to event details

  • Mark21
  • Autore della discussione
  • New Member
  • New Member
Di più
13 Anni 4 Mesi fa - 13 Anni 4 Mesi fa #4052 da Mark21
[SOLVED] Link to event details è stato creato da Mark21
I'm busy creating my own template for the eventlist but now i'm stuck with one question.

Standard in de ic_rounded only the title, the image and the +info parts are linking to the details of an event but i'd like to link it completely. Please look at this page to see what i mean: Click here

When you move your mouse on an event it gets brighter and the cursor changes to pointer. Wherever i click on that brighter part i want it to link to the detail page but I cannot get it to work.

I assum I need to be in the 'My_template_list.php' file but can you help me with the code?
Ultima Modifica 13 Anni 4 Mesi fa da Lyr!C. Motivo: [SOLVED]
Ringraziano per il messaggio: daikaadsteve

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
13 Anni 4 Mesi fa - 13 Anni 4 Mesi fa #4053 da Lyr!C
Risposta da Lyr!C al topic Link to event details
You can try this :
[...]
	<div class="items">
	<?php foreach ($stamp->items as $item){ ?>

	<a href="<?php echo $item->url; ?>" alt="<?php echo $item->title; ?>">
		<div class="event">

...
...Your code for one event...
...
		</div>
	</a>
	<?php } ?>

[...]

And remove others <a> tags from the code, so you will add link to event details view on all your <div> ;-)

Latest version : iCagenda 4.0.17 Joomla! 4 > Joomla! 6
We recommend every user to keep iCagenda updated.
Support for iCagenda version 3.9 (the final version compatible with Joomla 3) ended on October 13, 2026
Extended security support for the iCagenda PRO 3.9 version until October 13, 2027 (to benefit from this extended support, you must have a Pro subscription: www.joomlic.com/extensions/icagenda)
Don't forget to have your Joomla!® up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File allegato:

Ultima Modifica 13 Anni 4 Mesi fa da Lyr!C.

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Mark21
  • Autore della discussione
  • New Member
  • New Member
Di più
13 Anni 4 Mesi fa #4064 da Mark21
Risposta da Mark21 al topic Link to event details
Thank you! It works except for one thing:

The last event on the page has a discriptoin longer than the (in my case) allowed 250 characters and then it changes the text into a link. How can i prevent that from happening?

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
13 Anni 4 Mesi fa #4079 da Lyr!C
Risposta da Lyr!C al topic Link to event details
Can you post you all code for this file, so that i can have a look ?

(the closed tag </a> is maybe not at the good place, or a problem with div clear)

Latest version : iCagenda 4.0.17 Joomla! 4 > Joomla! 6
We recommend every user to keep iCagenda updated.
Support for iCagenda version 3.9 (the final version compatible with Joomla 3) ended on October 13, 2026
Extended security support for the iCagenda PRO 3.9 version until October 13, 2027 (to benefit from this extended support, you must have a Pro subscription: www.joomlic.com/extensions/icagenda)
Don't forget to have your Joomla!® up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File allegato:

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Mark21
  • Autore della discussione
  • New Member
  • New Member
Di più
13 Anni 4 Mesi fa #4081 da Mark21
Risposta da Mark21 al topic Link to event details
Ok, here it is.
<?php // List of events Template ?>
<div>
	<div class="items">
	<?php foreach ($stamp->items as $item){ ?>

	<a href="<?php echo $item->url; ?>" alt="<?php echo $item->title; ?>">
		<div class="event">
			<?php if ($item->next): ?>
			<span href="<?php echo $item->url; ?>" alt="<?php echo $item->title; ?>">
			<?php if (!$item->image): ?>

			<div class="box_date">

				<span class="day"><?php echo $item->day; ?></span><br/><?php echo $item->monthShort; ?>
				<span class="noimage"><?php echo JTEXT::_('COM_ICAGENDA_EVENTS_NOIMAGE'); ?></span>
			</div>

			<?php endif; ?>
			<?php if ($item->image): ?>

			<div class="box_date" style="background:(<?php echo $item->image; ?>) no-repeat center center; background-size: cover; border: 1px solid <?php echo $item->cat_color; ?>">

				<span class="day"><?php echo $item->day; ?></span><br/><?php echo $item->monthShort; ?>
			</div>

			<?php endif; ?>
			</span>
			<?php endif; ?>

			<div class="content">
				<div class="eventtitle">
					<table class="table">
						<tbody>
							<tr>
								<td class="tit" valign="middle">
									<div>
										<h1><a href="<?php echo $item->url; ?>" alt="<?php echo $item->title; ?>"><?php echo $item->title; ?></a></h1>
									</div>
								</td>
								<td class="cat" valign="middle">
									<div style="color:<?php echo $item->cat_color; ?>;">
										<?php echo $item->cat_title; ?>
									</div>
								</td>
							</tr>
						</tbody>
					</table>
				</div>
				<div style="clear:both"></div>

				<?php if ($item->desc): ?>
				<div class="descshort"><?php echo $item->descShort ; ?></div>
				<?php endif; ?>

			 	<div class="moreinfos">
			 		<?php echo JTEXT::_('COM_ICAGENDA_EVENTS_MORE_INFO'); ?>
			 	</div>

			</div>
			<div style="clear:both"></div>

		</div>
		</a>
		<?php } ?>


		<?php if ($this->atlist): ?>
			<div class="share"><?php echo $item->share; ?></div>
		<?php endif; ?>

	</div>
</div>
<div style="clear:both"></div>

There is one more <a> tag in it, but I got to keep that in it otherwise the title is not displayed properly.

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
13 Anni 4 Mesi fa - 13 Anni 4 Mesi fa #4082 da Lyr!C
Risposta da Lyr!C al topic Link to event details
So, maybe try this :
<?php // List of events Template ?>
<div>
	<div class="items">
	<?php foreach ($stamp->items as $item){ ?>
	<div>
	<a href="<?php echo $item->url; ?>" alt="<?php echo $item->title; ?>">
		<div class="event">
			<?php if ($item->next): ?>
			<span href="<?php echo $item->url; ?>" alt="<?php echo $item->title; ?>">
			<?php if (!$item->image): ?>

			<div class="box_date">

				<span class="day"><?php echo $item->day; ?></span><br/><?php echo $item->monthShort; ?>
				<span class="noimage"><?php echo JTEXT::_('COM_ICAGENDA_EVENTS_NOIMAGE'); ?></span>
			</div>

			<?php endif; ?>
			<?php if ($item->image): ?>

			<div class="box_date" style="background:(<?php echo $item->image; ?>) no-repeat center center; background-size: cover; border: 1px solid <?php echo $item->cat_color; ?>">

				<span class="day"><?php echo $item->day; ?></span><br/><?php echo $item->monthShort; ?>
			</div>

			<?php endif; ?>
			</span>
			<?php endif; ?>

			<div class="content">
				<div class="eventtitle">
					<table class="table">
						<tbody>
							<tr>
								<td class="tit" valign="middle">
									<div>
										<h1><a href="<?php echo $item->url; ?>" alt="<?php echo $item->title; ?>"><?php echo $item->title; ?></a></h1>
									</div>
								</td>
								<td class="cat" valign="middle">
									<div style="color:<?php echo $item->cat_color; ?>;">
										<?php echo $item->cat_title; ?>
									</div>
								</td>
							</tr>
						</tbody>
					</table>
				</div>
				<div style="clear:both"></div>

				<?php if ($item->desc): ?>
				<div class="descshort"><?php echo $item->descShort ; ?></div>
				<?php endif; ?>

			 	<div class="moreinfos">
			 		<?php echo JTEXT::_('COM_ICAGENDA_EVENTS_MORE_INFO'); ?>
			 	</div>

			</div>
			<div style="clear:both"></div>

		</div>
		</a>
		</div>
		<?php } ?>


		<?php if ($this->atlist): ?>
			<div class="share"><?php echo $item->share; ?></div>
		<?php endif; ?>

	</div>
</div>
<div style="clear:both"></div>

Latest version : iCagenda 4.0.17 Joomla! 4 > Joomla! 6
We recommend every user to keep iCagenda updated.
Support for iCagenda version 3.9 (the final version compatible with Joomla 3) ended on October 13, 2026
Extended security support for the iCagenda PRO 3.9 version until October 13, 2027 (to benefit from this extended support, you must have a Pro subscription: www.joomlic.com/extensions/icagenda)
Don't forget to have your Joomla!® up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File allegato:

Ultima Modifica 13 Anni 4 Mesi fa da Lyr!C.

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Mark21
  • Autore della discussione
  • New Member
  • New Member
Di più
13 Anni 4 Mesi fa #4083 da Mark21
Risposta da Mark21 al topic Link to event details
unfortunately that didn't do the trick.

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
13 Anni 4 Mesi fa - 13 Anni 4 Mesi fa #4084 da Lyr!C
Risposta da Lyr!C al topic Link to event details
This is because of a link in icmodel.php on " [...] "

In the future, i will add option for this, but currently, you can edit icmodel.php (in site/helpers/icmodel.php)

Replace this :
$text=strip_tags($text).'<a href="'.$url.'" class="more">'.$readmore.'</a>';

by this :
$text=strip_tags($text).' '.$readmore.' ';

If this works for you, this will be interresting for me to developp an option for short description display... (maybe with no link, as there's already "+ info" link available...

Latest version : iCagenda 4.0.17 Joomla! 4 > Joomla! 6
We recommend every user to keep iCagenda updated.
Support for iCagenda version 3.9 (the final version compatible with Joomla 3) ended on October 13, 2026
Extended security support for the iCagenda PRO 3.9 version until October 13, 2027 (to benefit from this extended support, you must have a Pro subscription: www.joomlic.com/extensions/icagenda)
Don't forget to have your Joomla!® up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File allegato:

Ultima Modifica 13 Anni 4 Mesi fa da Lyr!C.

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Mark21
  • Autore della discussione
  • New Member
  • New Member
Di più
13 Anni 4 Mesi fa #4085 da Mark21
Risposta da Mark21 al topic Link to event details
Yes that works! Thanks! B)

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
13 Anni 4 Mesi fa #4096 da Lyr!C
Risposta da Lyr!C al topic Link to event details

Mark21 ha scritto: Yes that works! Thanks! B)


I will remove the link in icmodel.php in the next release 3.0 (so that you won't have this problem when updating B) )

Latest version : iCagenda 4.0.17 Joomla! 4 > Joomla! 6
We recommend every user to keep iCagenda updated.
Support for iCagenda version 3.9 (the final version compatible with Joomla 3) ended on October 13, 2026
Extended security support for the iCagenda PRO 3.9 version until October 13, 2027 (to benefit from this extended support, you must have a Pro subscription: www.joomlic.com/extensions/icagenda)
Don't forget to have your Joomla!® up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File allegato:

Si prega Accedi o Crea un account a partecipare alla conversazione.

Tempo creazione pagina: 0.091 secondi

Follow Us

Create your Joomla templates with Template Creator CK

acymailing logo new