Image slider link to internal or external page on Sitefinity - sitefinity

(Sitefinity 6.x)
I am trying to create an image slider where each image in the page links to an internal or external page. I created a separate library for all the images that I want to show on the slider then using custom MVC widget I display the images in a slider.The problem that I have is there is no place in the image where I can link the image to open an existing internal page or external website.
Is there a way to add a properties to the original Image properties? so that users can select a page (using some sort of page selector just like in the navigation widget) or type in external page to link. If that is not possible, could you give me some ideas how to implement this?

I've been creating image rotators using Module Builder in Sitefinity. What you could do is go to Administration -> Module Builder -> Create a Module, call it Image Slider, call the content type Slide. Add a couple fields, for the first call it Image and select Media for the type, this will use an image selector for the interface, then add another field called Link and use Short text for the type, this will hold the url. Unfortunately, Sitefinity doesn't include a Page Selector control as an available field yet so a text field will have to do. Save and activate your module, it will show up under Content -> Types of Content. Go ahead and add a few slides. Sitefinity has created a couple of widgets when you created the module, so if you edit a page, you'll see them under the "Content" widget section, probably at the bottom. Drag it on the page and set it to use the list template. Now open up the Sitefinity Explorer window in their Thunder Visual Studio plugin, under Common Widget Templates, you'll see an Image Slider folder, you'll want to edit the list template since you'll be outputing all the slides into some carousel markup or something. From here you can use the default Sitefinity image control and bind the link to a hyperlink that wraps the image control, this will link each image to whatever is in that field.
Hope that helps.

Related

Shopify: How to make a custom template editable in the theme editor?

I am using the theme "Debut" and I've copied it to make a custom theme out of it.
Then, under "Edit code" I have create a new template for "blog".
Now, when I click on "Customize" button at my template, and the theme editor opens, I have a select box in the top bar where I can select the themes templates, and the pages I've created. But I can't find my custom blog template there, to edit it via the drag & drop editor.
How can I achieve this?
Any help is highly appreciated, thanks!
Once you add any custom template for a blog, product, or collection, they are not available directly into the backend customizer in Shopify.
In backend default templates are available, you need to assign the template to a page, product or blog and then navigate to the desired page, collection or product and blog page into backend using customizer window and then you able to edit the sections and blocks that are added to custom template code.

Access lastMeasurement in HTML widget

I want to reference the last measurment of a device in a HTML widget.
The page https://www.cumulocity.com/guides/users-guide/cockpit/ give samples to access these.
My attempt to show the TemperatureMeasurement doesn't return a result:
{{devices[391].lastMeasurement.c8y_TemperatureMeasurement.T}}
This is currently not possible from the HTML widget. You can only access the data inside the managedObject from there.
Maybe try using the SCADA widget for that and create your custom content as SVG instead of HTML.

Piranha CMS customisation

A few questions on customisation with Piranha CMS.
Is there a way to create additional custom site-wide items similar to those from the site helper? http://piranhacms.org/docs/api-reference/site-helper
e.g. to be able to set a phone number used throughout the site but still editable in the settings section of the manager.
Is is possible to create additional custom items for a page, e.g. page subtitle, and for those to appear in the Information section of page editing? Creating a region for say a page subtitle seems overkill.
Is it possible to create a custom page type with a region that is a collection of HtmlRegions or similar? e.g. for the purpose of managing a set of FAQs or similar enumerated content?
Is is possible to define custom settings properties for a page type?
Yes, you can add regions to your site in the same way as with page types under Settings > Sites. You then add content for them under Content > Pages > Edit Site.
You can add simple text properties on the page type. They will be shown as single line text inputs under Properties when editing the page.
No native support, however the region body can be anything that can be serialized to JSON so you have to handle this in the edit view for your region.
There is no support for injecting fields into the page settings, however if it's important you can override the whole edit view for pages and do anything you like by placing a copy of the view in the manager area in your local project. You can find the views in the github repo in the 2.2.5 branch.
Regards
HÃ¥kan

Orchard - Displaying widget on a custom module's page

I am developing a custom module for Orchard. I would like to use a Widget on one of my pages in my custom module.
How can I add the widget to a page (display it as a partial view? how to reference it?)?
The goal is to create a home page as a module, when you activate it, it would have all the features with Item Slider Widget - http://gallery.orchardproject.net/List/Modules/Orchard.Module.FeaturedItemSlider. So the widget would be in content part of the page.
Thank you
You can do this in two ways:
In the module management in the administration add new layer rule. You can specify the url rule with this syntax - url("~/myurl") or url("~/myotherurl") or ... where you can specify multiple urls where the module will be shown. Next, you can add your widget to that layer. This is OK if you need to show that widget in a small amount of pages.
You can add a new Zone inside your theme (lets say it will be called MyWidgetZone). Don't display this zone in your Layout.cshtml, but rather in the template where you would want to use it (for example in your Content-Page.cshtml file). To show this zone, you would use this syntax inside your template - Display(Layout.MyWidgetZone). All you have to do next is add your widget to MyWidgetZone inside module management administration and you're good to go..

How to change the url of my entire page when a new tab is selected? (Dojo-Tabcontainer)

I have used Dojo-Tabcontainer to create tabs. I want to have a separate template for every tab. So, when a tab is clicked I want a new page to be loaded and the url to be changed.
Can you please suggest a way to do this using Markup instead of programmatic way?
I'm thinking of using Template Inheritance while creating html page for each tab to avoid redundancy.
I can get some clue from this:
How to change Dojo TabContainer behaviour to simply open an external link instead of showing a ContentPane?
But I'm not sure how to do it via Markup instead of programming.