Expression Engine Join Channels - expressionengine

I'm pretty new to Expression Engine and am struggling with the following. I have a properties channel and a property_images channel. A property can have one or more images.
I'd like to display list of properties including an image and summary information. Users should be able to click through to view property detail page showing all property details and all images.
PropertyID is common to both channels but I can't work out how to do the join. Is this possible "out of the box" or do i need to use an add-on ... if the latter, any recommendations would be welcome.

How are you currently connecting your Property entries with your Property Images entries? Do you just have a Property ID field in each channel, and you're manually entering it in each location?
I'd suggest instead using Playa, which is a many-to-many relationship add-on. Add a "Property Images" field to your Properties channel, make it a Playa field, and select your Property Images channel as the source. You can then select as many entries from the Property Images channel as "related" to each property while editing that property entry, and display them using Playa's module tags on the front-end.
Alternately, you could use Matrix or Assets, both also by Pixel and Tonic, to add your property images directly to your property listings (that will save queries when displaying you data on the front-end).

Related

How to get 'Bills and Adjustment' grid fields in an endpoint extension

I'm working with a client on obtaining Bills and Adjustments values through the Contract based web services. I understand that certain fields aren't available in the Default Endpoint, and have to be obtained through an extension.
I'm trying to add fields from the Bills and Adjustments' Applications tab, but I'm running into a warning that I don't understand. If I extend the Default endpoint for 'Bills' (call it 'BillExt'), and I try to add the Reference Number field from the 'Applications' tab/grid (or any other field from that grid) - I get the following warning (see screenshot below)...
Can someone explain what the issue is, and how I go about adding these fields from the 'Applictaions' tab/grid? I've added fields from the 'Approval Details' grid without this warning without a problem. Is this a warning I can disregard?
You are trying to add a field from another table/view that can return multiple rows for a single Bill.
The correct way to do this is by adding a separate collection on the object and map the view on that collection. e.g: Applications or Details collections here.
That collection will have the information for all records related to the header once you retrieve them using the ?$expand=Details on the query string request.

Create category through javascript based outlook-addin

I want to create email category through java script based outlook-addin, searched through documentation however it seems they have not exposed the api in js.
help appreciated.
In addition to using EWS, it's also possible to create and set categories using REST from an add-in.
Categories can be read and set on a message. And master categories can be created as well. A benefit of creating the master category first is you can set the color of the category.
The difference between setting the category on the server and using the client-side JavaScript API (currently in preview), is when the category is set on the server, it will not appear right away in the client.
Office.Categories API Interface is currently in preview. You have the option to wait a while till next release or implement it by sending EWS request via makeEwsRequestAsync request and set the category for an item in Exchange.
To set/get categories of the message you may use 2 different message properties ...
"Custom" property with Id "00020329-0000-0000-C000-000000000046" ("Keywords") and type of "StringArray"
"Field" property with id "item:Categories" ("_Categories"), same type "StringArray".
Please note if category is not on the Master categories List, you still able to set it for the message, but it will have white color.
More information on EWS approach (with XML example) can be found at How to create/set category to email in OWA add-in.

Add finding attribute by name in Opencart Admin panel: Catalog - Attributes - Attributes

How to implement Attribute to find his own name in the admin area in Opencart : Products - Attributes - Attributes? Is that there is a separate field and simply by driving into the field and displays the name of the attribute is an attribute, as usual searching for items in the admin by name, but only with attribute
It's hard to understand what you are asking, but if you are trying to use attributes for products then you must first define them at catalog>attributes>attributes.
To List attributes in the Products tab you will need edit these files
admin>view>template>catalog>product_form.tpl
admin>controller>catalog>product.php
If your understanding of PHP or Opencart isn't very strong it will help you to copy data from the attribute.php controller to the product.php controller.
As for the search function, this is something I haven't done before but you could try using the search function on the front of the website as reference.
I recommend working through this as best you can then asking more questions if or when you get stuck.
*Update
Ok so since HTML is your strenth it will be smartest to start from there. Open any of these files (the ones that have the data you need).
admin>view>template>catalog>attribute_form.tpl
admin>view>template>catalog>attribute_group_form.tpl
admin>view>template>catalog>attribute_group_list.tpl
admin>view>template>catalog>attribute_list.tpl
Then work backwards with what you see. The tpl will show variables that look like $attribute, track these back to
admin>controller>catalog>attribute.php
admin>controller>catalog>attribute_group.php
And you will see how all the code is used to pull the data from the model and format it if necessary.

Expression Engine: How Do I include a channel within another channel?

How would I include contents from one channel into another channel?
For instance, If I have a channel of projects. And then I'd like to add items within that project.
Project
- Item
- url
- caption
- Item
- url
- caption
There is an new free alternative to Matrix: Grid Lite
Matrix is maybe over the top for your needs, even if it is one of my favorite EE addon.
I can think of three approaches here:
Use a Matrix field within your Project channel to add multiple items to each project.
Make a "Project Items" channel, and in that channel add a relationship field (or Playa field) that points to your Projects channel. This would link each item with its parent Project. When displaying your Project on the front-end, you'd use reverse-related entries to display that Project's items.
Make each Project a category, and then assign each entry in your Project Items channel to the proper Project category. (The downside here is that categories can only have very limited data associated with them - name, description, and image.) On the front-end you'd use the Channel Categories tag to display your Projects (categories), then then list that Projects items below using the Channel Entries tag and the category parameter.
Each of these approaches would work!
It sounds like you already have these two channels set up, so Matrix or Grid Lite, while great solutions, would require a lot of migrating work on your part.
Do you have a custom field that relates the two channels right now? i.e. in the Items channel, is there a custom field that allows you to choose (or write) which project the item belongs to? If that's the case, I can work toward a solution from there.

Sharepoint: Image field with a link

I would like to add a field to a list with displays an Image, but acts as a hyperlink. In other words like the "Hyperlink or Picture" column, but "Hyperlink AND Picture" instead.
Where the two fields you input would be the URL to the image to display, and the URL of the hyperlink.
This must be possible. I notice that the Type (in a document library) column does just that, and also includes the views that are currently being used (in the case of a folder).
Is it possible to duplicate the computed Type field in a document library to read two other fields in the list (which will act as the image url, and the redirect link)? What would the CAML be?
Thanks in advance if anyone could offer any insight.
Arnhem
This can be done but you would need to develop a custom field type. As you have found, SharePoint's default rendering for pictures is without the hyperlink. You need to change how the rendering behaves in Display mode in your own custom field. Check Patterns in Custom Field Rendering for more info.
There are also several examples of creating custom field types on the web. The MSDN articles give a lot of detail about how it all works but don't let that put you off as it's not too tricky.

Resources