Select
Parent template and click on “Assign” and choose the child template. Click on
Ok
Reference site for Sitecore and Dot NET. Call at +91-9910045174 for any Sitecore corporate trainings and workshops.
Surendra Sharma
![Surendra Sharma](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3Kx7BuxZdkSf13418poWRPL6REhcA2KhE8f7nY0R1OjVqRY5gASKEdm2RZdEMruoQ_ybApVSaUJCgw3wxAkKFC_uB4RTtQ9SpcU51Z51rIkmwgd0GH_5ydNwHndndsYoW8WoCr8YiCdw/s1600/bannar.jpg)
Search This Blog
Wednesday, June 5, 2013
Add sitecore reference in web.config file so that we can get intelligence in aspx files
<pages validateRequest="false">
<controls>
<add tagPrefix="sc" namespace="Sitecore.Web.UI.WebControls" assembly="Sitecore.Kernel" />
</controls>
</pages>
Map SiteCore Layout placeholder with Visual Studio
·
Create Template with standard values
·
Create Layout and relate the layout with the
template from Template – Presentation – details – Default – Edit – Select
layout – OK
·
Create Layout Page in Visual Studio with same
name. Add “sc” placeholder tag as
o
<sc:Placeholder
ID="ModelPlaceholder"
Key="ModelPlaceholder"
runat="server"
/>
·
Create XSLT in Sitecore in Layout\Renderings\Component.
Specify Path as “/layouts/Renderings/Components/ModelRendering.xslt”
o
Note: - This Path must map with VS folder
structure path. Check spellings.
·
Add XSLT in VS in “/layouts/Renderings/Components/ModelRendering.xslt”
like
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sc="http://www.sitecore.net/sc" xmlns:dot="http://www.sitecore.net/dot"
exclude-result-prefixes="dot
sc" >
<xsl:output method="html" indent="yes" encoding="UTF-8"/>
<!-- parameters -->
<xsl:param name="lang" select="'en'"/>
<xsl:param name="id" select="''"/>
<xsl:param name="sc_item"/>
<xsl:param name="sc_currentitem"/>
<!-- entry point -->
<xsl:template match="*">
<!--<xsl:value-of select
="$sc_currentitem"></xsl:value-of>-->
<table>
<tr>
<td>Model Name</td>
<td><sc:text field="ModelName"></sc:text></td>
</tr>
<tr>
<td>Model Number</td>
<td><sc:text field="ModelNumber"></sc:text></td>
</tr>
<tr><td>Model Image</td>
<td>
<sc:image Alt="Car" Width="100px" Height="100px" MaxWidth="500" MaxHeight="500" field="ModelImage"> </sc:image>
</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>
|
o
Note: - Keep all tag in small letters like <sc:text as
XSLT is case sensitive. While in VS you can write it as “<sc:Text”. Also
remove “id” and “runat” property from XSLT.
·
Build VS project.
·
Relate the XSLT with the template from Template
– Presentation – details – Default – Edit – Controls – Add – Select XSLT File –
Enter Placeholder name – Select - OK – OK
·
Create Content from template. See preview either
from Presentation – Preview or Publish – Preview.
Map SiteCore Layout with Visual Studio
·
Create Template for movie with standard values
·
Create Layout and relate the layout with the
template from Template – Presentation – details – Default – Edit – Select
layout – OK
·
Create Layout Page in Visual Studio with same
name. Add “sc” tags as
o
<sc:Text ID="ProductName"
Field="ProductName"
runat="server"></sc:Text>
o
<sc:Image ID="ProductImage"
Alt="Car"
Width="100px"
Height="100px"
MaxWidth="500"
MaxHeight="500"
Field="ProductImage"
runat="server"
></sc:Image>
·
Build VS project.
·
Create Content from template. See preview either
from Presentation – Preview or Publish – Preview.
Setup guide for Umbraco
Setup
guide for Umbraco
·
Create one empty database in SQL server.
·
Create folder “D:\Dev”
·
Copy “UmbracoCms.4.11.1.zip” into “D:\Dev” and
Unzip all files of “UmbracoCms.4.11.1.zip”.
·
Cut and paste all files and folder of “D:\Dev \UmbracoCms.4.11.1”
into “D:\Dev” and delete “UmbracoCms.4.11.1.zip” and “UmbracoCms.4.11.1”
folder.
·
Give full permission to “Authenticated Users”, “Self
account” and “IIS_IUSRS”
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8ggCSO84OLrWvgXQL1LucQxhmTycEsCavCY7SXWb9V6wUFzCBwhH5WhCKTBUVj8pUDk9Sy8t2kw2LD7CO_Tw4bMRr4jABPGAxdUvIponIONOoKlSglcPyrkpYJzP_nT-DsgFMUhQSHxA/s320/1.png)
·
Go to IIS and Right click on site and click on “Add
Web Site…”
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDViA2W1A3DP-ie02_CAjWqTwSbAulktpErH3nmj-_rHPEjS0Pk_kMCifbOatX1duAe4nV6gQL5riIn6JF_BZPhaYODf-elZ1YBHn_i77-H556-cAmw4oShjWmC4Kuy8aOmvutTAUEig8/s1600/2.png)
·
Specify Site
name, physical path and host name as below
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_LVFjoykA1PriZrbNgGsNUiWdQsSbyalklWlCmw0zAmX_s9USBN36ATjGIHJFwvj_QkQeAPW97oz7LrEURzwp8ZBwCtpS9AkgrQ6_-z02eSioNbI1J0ieNxUF3zTfE0-v_eFh3uznRno/s320/3.png)
·
Open “hosts”
file from “C:\Windows\System32\drivers\etc”
and add entry at last as
<IP Address> <Host
name>
Example: 172.27.150.56 local.umbraco.com
·
Browse website from IIS
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo4e_JkAxO5AjYmczLsejEjB3C_a9z1JbdGeJiq6Rk-vZVgzqeAITiynZy4IS4TT97BcQMtnL-NWJM6spY5p9MAGpZlo33sKxizm8ML9DWqmlNPFkrstU6UjeFcHWOzbtJMLQdY3Bofrw/s1600/4.png)
·
On Welcome screen click on “Lets Get Started” button
·
On license screen click on “Accept and Continue”
·
On “Database
configuration” screen fill the database info for empty created database
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5g0gokO1V_0E0oTL7Xk1_8uWr-VzMa9Yb6xqoQ8a6tvIg1lP3ypFIM4yuBbiz4NmWejGSEWxhA7rRPIhmyWOkUeDrmIsRwIzL6gUWaSEHIdvDHcHPxAVGc8qp9hULZ-RwuDqcpz31_ys/s320/5.png)
·
On next Umbraco install database and click
“Continue”
·
On “Create User” screen, create new user as
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiuzGqFb6gseveOjrom7ueLKEgattycOc38yFPNGCkILb2MLWcV5AhhXhXbCYkwLAhx4ZAxNbgGShaz-hXI2pBV-Z3Ne4SjEMnnatHZThJP-dtFHQLOf__gL_tqRNcUX8q5B3oji2CfCo/s320/6.png)
Generate 8 digit random alphanumeric number as a initial password in SQL Server
-- generate 8 digit random alphanumeric number as a initial password
declare
@alpha_numeric varchar(8)
set
@alpha_numeric=''
select
@alpha_numeric=@alpha_numeric+char(n) from
(
select top 8 number as n from master..spt_values
where type='p' and (number between 48 and 57 or number between 65 and 90)
order by newid()
) as t
--select @alpha_numeric
OR
Stored Procedure To check whether User already exist or not
CREATE PROCEDURE [dbo].[Proc_User_IsDuplicate]
@UserID AS INT,
@LoginID AS VARCHAR(100)
AS
BEGIN
IF @UserID > 0
BEGIN
IF (SELECT COUNT(*) FROM [User] WHERE
LoginID = @LoginID AND
UserID <> @UserID ) > 0
SELECT 1
IsDuplicate
ELSE
SELECT 0
IsDuplicate
END
ELSE
BEGIN
IF (SELECT COUNT(*) FROM [User] WHERE
LoginID = @LoginID AND IsActive =1) > 0
SELECT 1
IsDuplicate
ELSE
SELECT 0
IsDuplicate
END
END
Subscribe to:
Posts (Atom)