jan-vince / smallrecords

OctoberCMS plugin to store and manage records and lists
MIT License
30 stars 11 forks source link

Can I make use of 2 or more recordDetail component in a single page? #3

Closed onemedicare closed 6 years ago

onemedicare commented 6 years ago

Can I make use of 2 or more recordDetail component in a single page?

I have tried alias but it seems that the aliasing the components doesn't work

jan-vince commented 6 years ago

Hi, I have never used it this way.

Will look at it and let you know - this should work (and I will fix it if not right now :)

Thanks for an issue!

Jan

onemedicare commented 6 years ago

I did noticed that changing the default.htm with SELF variable does the trick. Hope this help. Thanks for a simple yet very very useful plugin. `

{% if __SELF__.recordDetail.preview_image %}
    <img alt="{{ __SELF__.recordDetail.name }}" src="{{ __SELF__.recordDetail.preview_image.getPath }}" />
{% endif %}

<h3>
    {{ __SELF__.recordDetail.name }}
</h3>

`

jan-vince commented 6 years ago

Hi @onemedicare this is fixed in v 1.1.10 - as I don't use component's default partials much (even those made by myself :), I haven't noticed this.

Thank you for posting this issue!

Jan