Place Holder Image

More
11 years 4 months ago #38400 by mikeg1
Place Holder Image was created by mikeg1
Is there a way to have a placeholder image that is used in the Category listings... or even the article listings... I have it set so it pulls the image from the article and displays one... if there isn't one to use, can FlexiContent use a placeholder image?

Also - Check out: webworxapp.com/scca

You see the red category title with the red bar... it says SCCA - it is above the leading edge pic... As you can see with how this page looks, I edited the code for that template and moved the title under the leading article image... but how do I move that Category title under the leading article's text/description? I cant find the template file that does that... I check all of them in the flexicontent templates... I am using the blog template style... basically I want the category title to be below the leading article but above the other articles.

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

More
11 years 4 months ago #38403 by ggppdk
Replied by ggppdk on topic Place Holder Image
Hello
A place holder image ?
you mean a "default image" right?

this is implemented for the image field, but not when extracting image from article

you can do it at the template though, with an if statement

which template are you using ?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
11 years 4 months ago #38404 by mikeg1
Replied by mikeg1 on topic Place Holder Image
yes default image... one for leading article and one for the others below it. In terms of template... when I go to Flexi - Category it says: Category Layout: Blog For the articles/items: Item Type: Article... Item layout: Default. Thanks again for the VERY fast response!

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

More
11 years 4 months ago #38407 by ggppdk
Replied by ggppdk on topic Place Holder Image
-- For category layout of blog template
edit category_items.php and category_items_html5.php

find in 2 places (one for leading and one for intro):
Code:
$src = flexicontent_html::extractimagesrc($items[$i]);

after it add:
Code:
if ($src=="") { $src="images/myfolder/muimage.jpg"; }

OR add:
Code:
if ($src=="") { $src="http://mysite.com/images/myfolder/muimage.jpg"; }


For Item Layout of default Template
copy "modular.php" inside item.php (as instructions inside item.php say)
Code:
<?php if (isset($item->positions['image'])) : ?> <!-- BOF image block --> <?php foreach ($item->positions['image'] as $field) : ?> <div class="flexi image field_<?php echo $field->name; ?>"> <?php echo $field->display; ?> <div class="clear"></div> </div> <?php endforeach; ?> <!-- EOF image block --> <?php endif; ?>

replace with:
Code:
<?php echo $field->display; ?>
Code:
<?php echo $field->display ? $field->display : '<img src="images/myfolder/myimage.png" />' ; ?>

If the above does not work (for any reason), then please seek the help of person with HTML/PHP knowledge he will be able to change the files given these instructions

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.373 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline