Main menu

Forum


[SOLVED] Link to event details

  • Mark21
  • Topic Author
  • New Member
  • New Member
More
13 years 4 months ago - 13 years 4 months ago #4052 by Mark21
[SOLVED] Link to event details was created by 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?
Last edit: 13 years 4 months ago by Lyr!C. Reason: [SOLVED]
The following user(s) said Thank You: daikaadsteve

Please Log in or Create an account to join the conversation.

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
13 years 4 months ago - 13 years 4 months ago #4053 by Lyr!C
Replied by Lyr!C on 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 Attachment:

Last edit: 13 years 4 months ago by Lyr!C.

Please Log in or Create an account to join the conversation.

  • Mark21
  • Topic Author
  • New Member
  • New Member
More
13 years 4 months ago #4064 by Mark21
Replied by Mark21 on 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?

Please Log in or Create an account to join the conversation.

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
13 years 4 months ago #4079 by Lyr!C
Replied by Lyr!C on 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 Attachment:

Please Log in or Create an account to join the conversation.

  • Mark21
  • Topic Author
  • New Member
  • New Member
More
13 years 4 months ago #4081 by Mark21
Replied by Mark21 on 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.

Please Log in or Create an account to join the conversation.

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
13 years 4 months ago - 13 years 4 months ago #4082 by Lyr!C
Replied by Lyr!C on 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 Attachment:

Last edit: 13 years 4 months ago by Lyr!C.

Please Log in or Create an account to join the conversation.

  • Mark21
  • Topic Author
  • New Member
  • New Member
More
13 years 4 months ago #4083 by Mark21
Replied by Mark21 on topic Link to event details
unfortunately that didn't do the trick.

Please Log in or Create an account to join the conversation.

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
13 years 4 months ago - 13 years 4 months ago #4084 by Lyr!C
Replied by Lyr!C on 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 Attachment:

Last edit: 13 years 4 months ago by Lyr!C.

Please Log in or Create an account to join the conversation.

  • Mark21
  • Topic Author
  • New Member
  • New Member
More
13 years 4 months ago #4085 by Mark21
Replied by Mark21 on topic Link to event details
Yes that works! Thanks! B)

Please Log in or Create an account to join the conversation.

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
13 years 4 months ago #4096 by Lyr!C
Replied by Lyr!C on topic Link to event details

Mark21 wrote: 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 Attachment:

Please Log in or Create an account to join the conversation.

Time to create page: 0.073 seconds

Follow Us

Create your Joomla templates with Template Creator CK

acymailing logo new