Sitecore Multilist dynamic website source property - sitecore

My Sitecore Content Editor has the following structure:
- Sitecore
- Content
- Brand Websites
- WebsiteOne
- Website - UK
- Pages
- Home
- WebsiteTwo
- ...
- WebsiteThree
- ...
I am trying to create a multilist that will allow editors to select pages to be displayed in the footer.
I want to allow the Source field of this multilist to be dynamic for the site that the editor is on (WebsiteOne/Two/Three).
I have been exploring the XPath Builder however i am not sure about the dynamic website name part.
Ideally what i want is something like:
./query:/sitecore/content/Brand Websites/[##name]/Website - UK/Pages/*
Is this possible to dynamically pass the current website into this query?

You will find your answer here.
Comes down to something like this:
query:./ancestor::*[##templatename='WebsiteHomeTemplateName']/Pages/*

Related

Add a new field to Sitecore JSS

I created a simple Sitecore JSS Application and imported the same.
In connected mode, I want to add a few new fields. I added them to the template (Image 1) and they show up in the item (Image 2). When I query the item, I get the new fields in the json object as well (Image 4).
However, I cannot see the new fields in the experience editor (Image 3) and I am assuming I need to add those in the View. I am unable to locate where I need to add these fields or what I need to do, to have these show up.
Image 1: The modified template
Image 2: Both description and photo show up in the item
Image 3: Description and photo do not show up in the experience editor
Image 4: Json however returns these 2 properties
The Experience Editor use the Node.js app inside the /dist folder of your Sitecore webroot. (See also the config, you can have multiple apps)
Change your frontend, I Guess you use React, Vue, or Angular and upload/deploy to the dist folder.
You need to choose your dev workflow see:
https://doc.sitecore.com/xp/en/developers/hd/190/sitecore-headless-development/development-workflows.html
When you add your fields in Sitecore, you are using the Sitecore-First Workflow.
Hidden gem:
JSS add a extra Field "Always Display Field Editor Button in Experience Editor" to Renderings. In the Experience editor the Chrome Toolbar from a rendering has as first icon a Pencil, That opens a Field editor for all custom fields.

How to restrict a sitecore droptree field to accept only media folder item and not allow media items

I'm trying to use a droptree field to allow content editors to pick one folder item from a tree of items. Here i have to restrict the droptree field to accept only media folder item and it should not allow media items like image and videos. I have set the source as datasource:
DataSource=/sitecore/media library/User Submitted Media&ExcludeTemplatesForSelection=Jpeg,Image
The above mentioned datasource is not working. Still i am able to select both media item and media folder. Sitecore version i am using is 7.2. Am i missing anything?
You can't use Include/Exclude TemplatesForDisplay/Selection with DropTree. See this stackoverflow answer

How do I add custom entities to Typo3 CMS?

In my project I need to add a lot of custom entities to Typo3 CMS.
Eg. I need to have Buildings, Building Companies, Architects, Certifications, and so on.
What is the common approach for doing this?
Should I develop a new extension?
How can I then have a custom backend for managing these entities? Eg. in the Buildings admin page I want to be able to add a new Building also associating one or more Architects to it. Is it feasible? How?
Can I create a custom backend field for looking up Architects in the Buildings admin page? (eg. something like StackOverflow tags system, a token input field which looks up for items in Architects table in real-time while editing a Building)
To map a business model into Typo3 I prefer to build an extension for that.
On the one hand you have the maximum flexibility by programming in PHP with the help of the Typo3 framework and on the other hand most of the backend management pages come in easy when using the standard MVC + TCA structure of Typo3 Extbase extensions (if it is your first try with Extbase you might want to have an Extbase book at hand).
You can have a look at the Typo3 TCA page to see which standard backend field types are available - there are shown a lot of example configurations. As in your case you might want to use a select field with property "size" > 1 and property "maxitems" > 1 to describe the relation between buildings and architects. As for the architects filter feature you might also want to add the property "enableMultiSelectFilterTextfield" as shown in this example.

Sitecore Multilist with Search and Images

I'm using Sitecore 7.2 with MVC. I have a component that has a Multilist with Search field that points to media items. There can be multiple media items here.
Is there a way to make this list editable via the Page Editor?
Thanks
Yes, you will need to use Edit Frames.
These posts describe what they are and how to use them:
http://briancaos.wordpress.com/2011/11/28/using-sitecore-editframe-in-pageedit/
http://www.cmsbestpractices.com/how-to-properly-use-sitecore-edit-frames/

Proxy URL issue for Media Library Items in Sitecore Rich Text Editor

I am having an issue regarding the media library item URLs in the Rich Text editor
Currently we have set up our site as
www.mysite.com - for public content
cms.mysite.com - for Sitecore admin (This is a proxy URL which can be accessed within internally)
It works perfectly except that when Saving the content in the Rich Text editor, all URLs to the media library items (PDF, images) will be converted using the path "http://cms.mysite.com". We always have to go to the HTML View to manually remove all the cms.mysite.com URL - which is a pain.
The links to the content items/pages are fine. Only the links to the media library items will be converted during the save.
The Staging Module is not used so I wonder if there is a configuration to disable the conversion or do something to stop the URL conversion. Thanks!
Revoked original response as I found I was wrong.
At least in 6.3.x and onwards, the RTE doesn't appear to store the hostname in the media links. What version are you using?