Search found 60 matches

by Sendlingur
Thu Mar 14, 2019 10:19 am
Forum: Modules/Add-Ons
Topic: how to not display img tag if image don´t exists
Replies: 2
Views: 674

how to not display img tag if image don´t exists

Im using this loop to loop through a huge database. It takes the content images and puts them in the <img> tag. In most cases the image is still around and every thing works fine. But in some cases the image doesn't exist and the img url is broken and as a result it displays the no image icon. the t...
by Sendlingur
Tue Mar 12, 2019 4:07 pm
Forum: Modules/Add-Ons
Topic: first item from foreach loop from cgsi_getimages
Replies: 2
Views: 698

first item from foreach loop from cgsi_getimages

I'm using the cgsi_getimages to access images from content. (see codeblock below) I only want to use the first image from the array, I have tried to use "{$image.src.0}" , "{$image.src.[0]}" , "{$image.src.first}", etc. without any luck. This is the loop I'm using: {if !empty($entry->fields)} {cgsi_...
by Sendlingur
Thu Feb 28, 2019 9:57 am
Forum: Modules/Add-Ons
Topic: Self_link href not working in Company Directory
Replies: 1
Views: 818

Self_link href not working in Company Directory

Hi all I'm using the link to internal cmsms page option in the Company Directory editor. I can add it in the editor but if I click the link it is broken and shows a very strange url.( see below) https://mywebsite/%7Bcms_selflink%20href='introduction-information'%7D Is there a way to fix this? I have...
by Sendlingur
Tue Feb 26, 2019 6:30 pm
Forum: Modules/Add-Ons
Topic: Access content images in news summary template
Replies: 9
Views: 1336

Re: Access content images in news summary template

Thank you all for your posts, I'm constantly learning new things :)

I made it all work by using

Code: Select all

 {foreach from=$imageinfo item=image}
 {$image.tag}
{/foreach}

by Sendlingur
Tue Feb 26, 2019 4:11 pm
Forum: Modules/Add-Ons
Topic: Access content images in news summary template
Replies: 9
Views: 1336

Re: Access content images in news summary template

this is great... I'm almost there :) I can see the images in the array by using {$imageinfo|print_r} Array ( [0] =>Array ( [tag] =>"<img src="uploads/images/Bokverkstaedi.jpg" alt="" width="500" height="375"> " [src] => uploads/images/Bokverkstaedi.jpg [width] => 500 [height] => 375 ) ) 1 But if I d...
by Sendlingur
Tue Feb 26, 2019 3:31 pm
Forum: Modules/Add-Ons
Topic: Access content images in news summary template
Replies: 9
Views: 1336

Re: Access content images in news summary template

Ok thank you, this sound like a better solution :) how would I use the $imageinfo to display below the {else} tag in my code? {foreach from=$items item=entry} <div class="news-item animation-top"> <figure class="bg-img">{if isset($entry->fields)} {foreach from=$entry->fields item='field'} {if $field...
by Sendlingur
Tue Feb 26, 2019 2:46 pm
Forum: Modules/Add-Ons
Topic: Access content images in news summary template
Replies: 9
Views: 1336

Re: Access content images in news summary template

thank you for this answer, I don't have time to install/setup new things for this project. I have been trying to work around this problem by using this code in a UDT, but somehow the NEws template is not able to read to {$entry->content} tag $subject= {$entry->content}; $pattern='/.*<img src="(.*?)"...
by Sendlingur
Tue Feb 26, 2019 12:59 pm
Forum: Modules/Add-Ons
Topic: Access content images in news summary template
Replies: 9
Views: 1336

Access content images in news summary template

I recently copied a lot of news from a older version of my web to a newer version. The problem is: In the older version Images was added to the news articles as CONTENT via the wyzwig editor. So the url to those images is upload/images/image.jpg... But my news summary template assumes that images ar...
by Sendlingur
Mon Jan 21, 2019 1:34 pm
Forum: Modules/Add-Ons
Topic: upload images from file manager via custom file field
Replies: 1
Views: 475

upload images from file manager via custom file field

Hi In my news module I created a custom file field called 'images' to upload images. when I choose to upload image via that custom field I am only able to search for images on my local Drive. What if I want to upload an image that are in the file manager? How am I supposed to do that via the custom ...
by Sendlingur
Thu Dec 13, 2018 11:34 am
Forum: General Discussion
Topic: Path to JS map, best practice?
Replies: 1
Views: 3879

Path to JS map, best practice?

Hi all I'm working on a project on 'localhost'. As for now I've been using the uploads folder to store additional JS scripts. It is obviously not the best practice :) the plan is to move the JS map somewhere else before deployment. Where is the "best" place to store JS, bootstrap, etc maps in the cm...
by Sendlingur
Mon Dec 10, 2018 4:09 pm
Forum: Layout and Design (CSS & HTML)
Topic: cmsms content_en only display specific html tags???
Replies: 2
Views: 865

cmsms content_en only display specific html tags???

I'm not using the wysiwyg editor on my content pages there for my content pages looks like this. <section class="text-section type2"> <div class="container animation-top"> <h2>{title}</h2> <p>some content text ...</p> </div> </section> in my search results page I use {page_attr key=content_en} to di...
by Sendlingur
Mon Dec 10, 2018 2:12 pm
Forum: CMSMS Core
Topic: Adding {$entry->content} to search results.
Replies: 15
Views: 2327

Re: Adding {$entry->content} to search results.

Thank you all for your help, I'll test the solution from Velden.

Is there a release date for 2.3?
by Sendlingur
Wed Dec 05, 2018 4:29 pm
Forum: CMSMS Core
Topic: Adding {$entry->content} to search results.
Replies: 15
Views: 2327

Re: Adding {$entry->content} to search results.

I've been trying to make this work so I can display few lines from the content in the search results. I found this old post with a great answer, but it is not working for cmsms 2.x. It seems to be exactly what I need. I've been trying to rewrite the answer for cmsms 2.x but with out any luck. I beli...
by Sendlingur
Mon Nov 19, 2018 2:14 pm
Forum: Modules/Add-Ons
Topic: News module "See more" link to External Webpage?
Replies: 1
Views: 477

News module "See more" link to External Webpage?

Hi all I've one question.

Is it possible to somehow use the "See more" link to go to an external webpage instead of going to the detailpage?

And off course without making a new template for each news item.

thanks in advance.
by Sendlingur
Thu Oct 18, 2018 3:46 pm
Forum: Layout and Design (CSS & HTML)
Topic: <h3> and <p> tags inside <a></a> tags not showing
Replies: 2
Views: 1071

<h3> and <p> tags inside <a></a> tags not showing

I'm trying to use this code in the content editor <div class="col-lg-4 col-md-5 col-sm-6 flex-box floor-descr"> <a href="{cms_selflink href ="seemorepage"}" class="service-box"> <h3>Text</h3> <p>More text text text text </p> <footer> <span class="see-more">See more</span> </footer> </a> </div> For s...

Go to advanced search