Main menu

Forum


[SOLVED] Link to event details

  • Mark21
  • Auteur du sujet
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 13 ans 4 mois - il y a 13 ans 4 mois #4052 par Mark21
[SOLVED] Link to event details a été créé par 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?
Dernière édition: il y a 13 ans 4 mois par Lyr!C. Raison: [SOLVED]
Les utilisateur(s) suivant ont remercié: daikaadsteve

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 13 ans 4 mois - il y a 13 ans 4 mois #4053 par Lyr!C
Réponse de Lyr!C sur le sujet 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) .

Fichier attaché :

Dernière édition: il y a 13 ans 4 mois par Lyr!C.

Connexion ou Créer un compte pour participer à la conversation.

  • Mark21
  • Auteur du sujet
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 13 ans 4 mois #4064 par Mark21
Réponse de Mark21 sur le sujet 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?

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 13 ans 4 mois #4079 par Lyr!C
Réponse de Lyr!C sur le sujet 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) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

  • Mark21
  • Auteur du sujet
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 13 ans 4 mois #4081 par Mark21
Réponse de Mark21 sur le sujet 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.

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 13 ans 4 mois - il y a 13 ans 4 mois #4082 par Lyr!C
Réponse de Lyr!C sur le sujet 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) .

Fichier attaché :

Dernière édition: il y a 13 ans 4 mois par Lyr!C.

Connexion ou Créer un compte pour participer à la conversation.

  • Mark21
  • Auteur du sujet
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 13 ans 4 mois #4083 par Mark21
Réponse de Mark21 sur le sujet Link to event details
unfortunately that didn't do the trick.

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 13 ans 4 mois - il y a 13 ans 4 mois #4084 par Lyr!C
Réponse de Lyr!C sur le sujet 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) .

Fichier attaché :

Dernière édition: il y a 13 ans 4 mois par Lyr!C.

Connexion ou Créer un compte pour participer à la conversation.

  • Mark21
  • Auteur du sujet
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 13 ans 4 mois #4085 par Mark21
Réponse de Mark21 sur le sujet Link to event details
Yes that works! Thanks! B)

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 13 ans 4 mois #4096 par Lyr!C
Réponse de Lyr!C sur le sujet Link to event details

Mark21 écrit: 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) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

Temps de génération de la page : 0.087 secondes

Follow Us

Créez vos templates Joomla avec Template Creator CK

acymailing logo new