小编Aym*_*oum的帖子

BeginRenderLink Sitecore Glass Mapper

我在Sitecore中有两个字段:

  • 阅读更多链接.
  • 阅读更多标题.

我正在使用带有glass mapper的sitecore MVC,我需要从page eidtor中创建两个字段,所以我使用这段代码:

<div class="callout-footer">
   <p>
     @using (BeginRenderLink(calloutItem, m => m.ReadMoreLink, new NameValueCollection { { "class", "group-action" } }, isEditable: true))
     {
        <span class="text">@Editable(calloutItem, m => m.ReadMoreTitle) </span>
     }
   </p>
</div>
Run Code Online (Sandbox Code Playgroud)

现在我可以编辑链接,但标题仍然不可编辑.如何从页面编辑器中使它们都可编辑?

asp.net-mvc sitecore sitecore7 glass-mapper

5
推荐指数
1
解决办法
3638
查看次数

使用AngularJS和Sitecore(SPA)构建单页应用程序

我想实现Sitecore应用程序(带有角度js的单页设计):

  1. 那可能吗 ?
  2. 如果有可能,那么体验编辑器会如何使用呢?
  3. 那么Sitecore个性化呢?
  4. 我对角度js没有经验.为实现这一目标,我应该考虑什么

我将使用Sitecore 8.我发现这个有用的博客,但正如他所提到的,页面编辑器根本不起作用

谢谢.

sitecore angularjs sitecore8

5
推荐指数
1
解决办法
5140
查看次数

设置指定体验编辑器的上下文站点

我正在处理多站点,我想打开上下文站点的体验编辑器,但 sitecore 无法解析上下文站点,它总是将我带到默认网站,sitecore.config 文件中有一个设置,我将其设置为“ true”,但它仍然带我到默认网站:

http://mywebsite.local/?sc_mode=edit&sc_site=网站

这是sitecore.config中的设置,我的sitecore版本是8.1(更新2)

<!--  PREVIEW - RESOLVE SITE
            If false, the Preview.DefaultSite setting specifies the context site to use when a user previews an item.
            If true, when a user previews an item, Sitecore tries to resolve the root item and the context site based on the current content language
            and the path to the item. If Sitecore cannot resolve the context site, it uses the site that is specified in the Preview.DefaultSite setting.
            Default value: …
Run Code Online (Sandbox Code Playgroud)

sitecore sitecore8 sitecore8.1

5
推荐指数
1
解决办法
1654
查看次数

GlassMapper数据源和当前项目

我正在使用玻璃映射器中的GetDataSourceItem方法将我的数据源项返回到视图,当数据源为空时,我调试了代码,控制器中的calloutModel将为null,但是从视图中,模型将不为null,它将具有当前项目模型,我正在使用以下代码:

我的控制器动作:

 public ActionResult Callout()
        {
            // I didn't fill the datasource in the component
            // calloutModel value is coming null.

            var calloutModel= GetDataSourceItem<CalloutModel>();
            return View(calloutModel);
        }
Run Code Online (Sandbox Code Playgroud)

我的看法

 @inherits Glass.Mapper.Sc.Web.Mvc.GlassView<CalloutModel>
 // Model is coming the current item in the view (it should be null)
Run Code Online (Sandbox Code Playgroud)

sitecore glass-mapper sitecore8

3
推荐指数
1
解决办法
1846
查看次数

访问其他语言的网站

我在我的网站ar-AE中添加了新语言,如果我想访问阿拉伯语网站,我会在网站网址后附加"ar-AE":

http://mywebsite.com/ar-AE/aboutus

但我希望它只与/ ar一起使用

http://mywebsite.com/ar/aboutus

我怎么能用sitecore做到这一点?

sitecore sitecore8 sitecore8.1

3
推荐指数
1
解决办法
83
查看次数

extjs:加载掩码网格

我正在使用extjs网格,我有一个jQuery计时器,它将RenderGrid每20秒调用一次函数.我想为每个计时器刻度显示网格掩码.请指教.

function RenderGrid(dataObj) {

        var jasonContent = JSON.parse(dataObj)

        if (document.getElementById('panel').innerHTML != '') {
            document.getElementById('panel').innerHTML = '';
        }
        var myData = {
            records: jasonContent
        };

        var fields = [
   { name: 'Position_ID', mapping: 'Position_ID' },
   { name: 'PriorityCount', mapping: 'PriorityCount' },
   { name: 'MyCheckBox', mapping: 'MyCheckBox' },
   { name: 'Veh_Plateno', mapping: 'Veh_Plateno' },
   { name: 'Drv_Firstname', mapping: 'Drv_Firstname' },
   { name: 'GPSTimeAsString', mapping: 'GPSTimeAsString' },
   { name: 'Speed', mapping: 'Speed' },
   { name: 'SubFleet_Name', mapping: 'SubFleet_Name' }

];

        var …
Run Code Online (Sandbox Code Playgroud)

extjs

2
推荐指数
1
解决办法
2万
查看次数

SQL中一列的逗号分隔值不同

我在SQL中有一个查询返回以下结果:

Id language
1. English, French, spanish
2. English, English, spanish
3. French, French, English
Run Code Online (Sandbox Code Playgroud)

我不希望语​​言具有重复值,所以如果我有两种英语语言,我只需要显示一种,所以结果应该是这样的:

Id language
1. English, French, spanish
2. English, spanish
3. French, English
Run Code Online (Sandbox Code Playgroud)

我怎么能在SQL中做到这一点?

sql sql-server sql-server-2008

2
推荐指数
1
解决办法
2381
查看次数

Sitecore词典项目

在早期版本的Sitecore中,字典项存在问题,如果我们有CD环境,有时Dictionary.dat文件可能无法在CD服务器上更新.

1)Sitecore 8仍然存在此问题吗?

2)如果是,为我的网站实现自定义词典项目的最佳方法是什么?

sitecore sitecore-mvc sitecore8 sitecore8.1

2
推荐指数
1
解决办法
1969
查看次数

CM环境中的Sitecore Web索引

我正在CM和CD环境中部署我的网站,我使用solr进行搜索我按照Sitecore的所有说明从这个链接配置cm环境:

https://doc.sitecore.net/sitecore_experience_platform/setting_up__maintaining/xdb/configuring_servers/configure_a_content_management_server#_How_to_configure

当我打开cm网站时,我收到错误说sitecore_web_index未找到:

在此输入图像描述

在上面的链接当我转到文件以启用或禁用Solr部分并单击"Excel电子表格".他们说禁用

Sitecore.ContentSearch.Solr.Index.Web.config:

在此输入图像描述

有关此错误的任何想法?我应该在CM上保持web索引禁用吗?

我正在使用sitecore 8.1 update 2

我正在使用此代码来检索项目:

ISearchIndex SitecoreSearchIndex=ContentSearchManager.GetIndex("sitecore_" + Sitecore.Context.Database.Name + "_index");
using (var context = SitecoreSearchIndex.CreateSearchContext())
{
    var culture = Sitecore.Context.Language.CultureInfo;
    var predicate = PredicateBuilder.True<SearchResultItem>();
    predicate = predicate.And(p => p.Paths.Contains(CommonTextFolderId));
    predicate = predicate.And(p => p.TemplateId == CommonTextTemplateId);
    predicate = predicate.And(p => p.Language == culture.Name);
    var items = context.GetQueryable<SearchResultItem>().Where(predicate);
    listCommonTexts = items.Select(p => SitecoreContext.Cast<CommonTextModel>(p.GetItem(), false, false)).ToList();

}
Run Code Online (Sandbox Code Playgroud)

solr sitecore sitecore8 sitecore8.1

1
推荐指数
1
解决办法
358
查看次数