Search found 62 matches

by Sendlingur
Wed May 22, 2019 3:32 pm
Forum: CMSMS Core
Topic: troubles with {if}]{elseif}{else}
Replies: 1
Views: 800

troubles with {if}]{elseif}{else}

I've been trying to make this if statement work as I want it to: it is a part of a bigger loop that iterates through a bunch of articles. If $entry->fields is empty it should get an image from {$entry->file_location} If $entry->fields is still empty after that the code should look for image in the c...
by Sendlingur
Fri Mar 15, 2019 9:48 am
Forum: Modules/Add-Ons
Topic: how to not display img tag if image don´t exists
Replies: 2
Views: 1207

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

Thank you so much, this works perfectly :)
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: 1207

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: 1216

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 ...
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: 1131

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: 2456

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: 2456

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.j...
by Sendlingur
Tue Feb 26, 2019 3:31 pm
Forum: Modules/Add-Ons
Topic: Access content images in news summary template
Replies: 9
Views: 2456

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...
by Sendlingur
Tue Feb 26, 2019 2:46 pm
Forum: Modules/Add-Ons
Topic: Access content images in news summary template
Replies: 9
Views: 2456

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: 2456

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: 867

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: 4779

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...
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: 7333

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 k...
by Sendlingur
Mon Dec 10, 2018 2:12 pm
Forum: CMSMS Core
Topic: Adding {$entry->content} to search results.
Replies: 15
Views: 5122

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: 5122

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

Go to advanced search