Jump to content

Sonya*

Clients
  • Posts

    3,947
  • Joined

  • Days Won

    34

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Projects

Release Notes v5

Forums

Events

Store

Gallery

Posts posted by Sonya*

  1. I have created Page CSS. It works on the page with database. Now I would like to include it into custom block (Plugin) based on this database. This does not work:

    {{\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'myfolder/general.css', 'cms', 'front' ) );}}

    And using a template plugin, I get 'ErrorException: template_store_missing (0)':

    {template="includeCSS" app="cms" group="myfolder/general" location="front" params=""}

    Is there any other idea of how to include Page CSS in the block or other templates?

    Note: I do not have any app or plugin. This is just a simple Pages database.

  2. 6 hours ago, IPCommerceFan said:

    Have you tried something like:

    {{sort($images); sort($thumbs);}}

    Before plugging them into the foreach loop?

    sort() sorts by value, so if the value is the filename, it should align them.

    Unfortunately, there is no original filename saved in $thumbs. This:

    $thumbs = $record->customFieldDisplayByKey('images', 'thumbs');

    returns the thumbs' filenames only.

  3. We can use database relationship fields to display references to other databases inside the record. And we can enable Cross link records? to show the records in the remote database related to a given record. Right now, it is just a link. It would be very helpful to get a third display option for those fields.

    screenshot-2021_10.18-09_13_47.thumb.png.6b9d82413668690c434078c44da20b2c.png

    This way we could use custom format for the reciprocal view. We could use record image, truncated record content or any other fields to control display of crossed-link record in the remote database.

  4. I have defined a multiple Upload field in a Pages database for images only. I would like to display the images in carousel and need thumbs and original locations. I have tried this:

    {{$images = $record->customFieldDisplayByKey('images', 'raw') and $thumbs = $record->customFieldDisplayByKey('images', 'thumbs');}}

    But this does not work as the order of thumbs and images does not match. This is the order of the images in cms_custom_database_3 in field_10

    monthly_2021_10/lake-6641880.jpg.eb13d74004f9c2719eecf920c705eaea.jpg,
    monthly_2021_10/redwood-national-park-6667452.jpg.f024a0c23e256de59503715f6a5809db.jpg,
    monthly_2021_10/forest-6631518.jpg.18a05d8e1196c485d6f6730cff014802.jpg,
    monthly_2021_10/port-6587129.jpg.3a1f9ae14ccc546b986c650dbfc1e2c9.jpg,
    monthly_2021_10/mountain-6596074.jpg.4d769ca0cd65e76e39deebd96d2c582c.jpg,
    monthly_2021_10/road-6654573.jpg.f365a8856c7345336369744fdf75c769.jpg,
    monthly_2021_10/mountain-6596074.jpg.1b314572d0782d331d805402d5f98359.jpg

    And this is the order of corresponding thumbnails in cms_database_fields_thumbnails

    monthly_2021_10/forest-6631518.thumb.jpg.d896d119037c222abaa3e01b954f53d6.jpg
    monthly_2021_10/lake-6641880.thumb.jpg.e663cec5935dd46dd17c8eea53e2abc8.jpg
    monthly_2021_10/mountain-6596074.thumb.jpg.b67d42b61e18ef89cc6b20d7f46cf920.jpg
    monthly_2021_10/mountain-6596074.thumb.jpg.7631cc0f9891e80111b11ed9f6f3aad1.jpg
    monthly_2021_10/port-6587129.thumb.jpg.06a581614fed46b8d476b02292ebc366.jpg
    monthly_2021_10/redwood-national-park-6667452.thumb.jpg.a04f7c6d2ef63140f0133a5a92ff0f80.jpg
    monthly_2021_10/road-6654573.thumb.jpg.3bc0c3502d08fae23770e768bfdf289b.jpg

    You see that order is not the same. So the both arrays $images and $thumbs cannot be used just by their index.

    That's why, I cannot map the images and thumbs in foreach loop as suggested below:

    {{foreach $images as $index => $src}}
    	<li class='ipsCarousel_item ipsAreaBackground_reset ipsPad_half' data-ipsLazyLoad><a href='{$src}' data-ipsLightbox><img src='{$thumbs[$index]}'/></a></li>
    {{endforeach}}

    Question: how do I get thumbs and original image locations in the right order to use in the database template for carousel?

    Thank you!

  5. 1 hour ago, Jimi Wikman said:

    So if there is a way to break down that silo and allow database relations with all data, then that would be awesome 🙂

    I have added a custom field "Node" (see system/Helpers/Form/Node.php) to the types of custom fields in database, where every content node within IPS can be referenced. It works, it is just a small plugin that extends field types of Pages. 

  6. On 10/7/2021 at 7:34 AM, Sonya* said:
    • Database with categories. Database index is set to Show categories. Page title is ignored in h1 and title tag, the database name is used instead.
    • Database with categories. Database index is set to Show records like articles. Page title is ignored in h1 and title tag, the database name is used instead.

    Probably it would be helpful, if this setting were not available on the databases with categories at all? This would save time figuring out, why it does not work.

    13 minutes ago, Matt said:

    I do agree that it's a bit scrappy and we will clarify this in the UI at a later date.

     

  7. Thank you! In case someone looking for:

    {expression="\IPS\DateTime::ts($record->record_publish_date)->format('j. F, Y')"}

    This method does not use locales. All output is in English. https://www.php.net/manual/de/datetime.format.php

    strFormat does respect locale

    {expression="\IPS\DateTime::ts($record->record_publish_date)->strFormat('%e. %B, %Y')"}
  8. 5 minutes ago, Marc Stridgen said:

    We can do this for you.  If you can let us know which licence (abbreviate if needed), I can generate one for you. There is no way in which to do this automatically

    Please create an invoice for invisionfocus.de only. Thank you!

  9. I have some IPS licenses. Some of them are active and some are expired. I would like to renew one of the expired. However, if I try to renew, I am forced to renew two other licenses as well. I would like to renew only one I have selected and need one invoice per license.

    Is it possible to split renewal invoices per license? Thanks.

  10. 44 minutes ago, Chris027 said:

    The more we see issues flagged that aren't issues, we end to ignore what may be a real issue. 

    Same here. I ignore the section because my MariaDB version (10.1) does not support Dynamic:

    screenshot-2021_10.11-20_52_48.thumb.png.622a8cbd95e44b209874bb6aee634bfc.png

    IPS does support my database version, but says there is an issue at the same time. I cannot solve the "issue" as the supported database version does not offer the recommended option. So, I wonder is it an issue or is it supported.

    Episode 2 Abc GIF by The Bachelor

    I would also appreciate if we could dismiss. As the real issues can be lost among those.

  11. Edit: the upper result is reproducible with Page name. If I fill out Page Title, then I get it into title tag but still not in <h1> on the page (except of case 3). There are three titles: Database title, Page name and Page Title, that seem to be used (or not) randomly depending on what settings the database has.

  12. I have two databases, one with categories and on without categories. Both have an option Use page title ticked. 

    1. Database with categories. Database index is set to Show categories. Page title is ignored in h1 and title tag, the database name is used instead.
    2. Database with categories. Database index is set to Show records like articles. Page title is ignored in h1 and title tag, the database name is used instead.
    3. Database without categories. Database index is set to Show record list. Page title works as desired in h1 and title tag.
    4. Database without categories. Database index is set to Show records like articles. Page title works partially and is used in title tag but not in h1, the database name is used instead.

    I have used default Pages templates to test these settings:

    screenshot-2021_10.07-07_03_04.png.e2ec4154725c731ca5773e27406c5fc6.png

    Does it work as desired? Should page title be used in any case if ticked? For databases with or without categories, and whether to show records like articles or not.

×
×
  • Create New...