الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

Site Map problem In ASP.NET

مغلق
بدأه musaireae في 1 فبراير 2007 · 7 رد · 1,028 مشاهدة · في ASP.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم ورحمه الله وبركاته

اما بعد فلدي مشروع بسيط أردت من خلاله انشاء site map لكل جزء معين بحده ولكن للاسف لم استطع عمل ذلك ، في كل مره تظهر لي site map الموجوده في default path ، أي اقصد عندما أعمل site map داخل لمجلد معين (قسم معين) يتضح لي ان navigation tools تأخذ site map الموجوده في default path .

فما العمل و للتوضيح فقد ارفقت مثال لما اريد توضيحه.

WebSite2.zip

If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.

#2

لا جديد يذكر.

If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.

#3

عزيزي musaireae

يجب ان يكون ملف Web.sitemap في الـ Root فقط

ولي إضافة روابط متفرعة قم بزيادة ال node في ملف Web.sitemap

بزيادة علامة ~

<?xml version="1.0" encoding="utf-8" ?>
<siteMap>
  <siteMapNode>
  <siteMapNode title="Link title1" >
	<siteMapNode title="Link title2" >
	  <siteMapNode title="url1" url="~/NewFolder1/default1.aspx"/>
	  <siteMapNode title="url2" url="~/NewFolder1/default2.aspx"/>
	  <siteMapNode title="url3" url="~/NewFolder1/default3.aspx"/>  
	  <siteMapNode title="url4" url="~/NewFolder1/default4.aspx"/>
	</siteMapNode>
	<siteMapNode title="Link title3" >
	  <siteMapNode title="url5" url="~/default.aspx"/>
	</siteMapNode>
  </siteMapNode>
  </siteMapNode>
</siteMap>

طريقة حماية الصفحة بالصورة العشاوائية Captcha

/index.php?showtopic=117870

#4

هل بالامكان ان يكون في root ملفين من نوع site map اي ان يكون لدي ملفين واحد للمراقبين و واحد للاعضاء على سبيل المثال .

اذا كان بالامكان عمل ذلك فكيف يتم تحديد source

If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.

#5

على حد علمي لا يمكن ان يكون في الRoot إلا ملف واحد سيتم التعامل معه و يجب ان يكون بالاسم Web.sitemap

لان SiteMapDataSource يتعامل معه بشكل تلقائي .

يمكن ربط اكثر من ملف Web.sitemap بأي أسم ولكن يشترط ان يكون تابع للملف الرئيسي الموجود في المجلد الرئيسي Rootوذلك كتالي :

إضافة السطر التالي داخل الملف الرئيسي Web.sitemap :

<siteMapNode siteMapFile="~/NewFolder1/Web2.sitemap" />

او تكون الاضافة داخل ملف الاعدادات Web.Config كتالي :

<configuration>
  <!-- other configuration sections -->
  <system.web>
	<!-- other configuration sections -->
	<siteMap defaultProvider="XmlSiteMapProvider">
	 <providers>
	   <add 
		 name="File1"
		 type="System.Web.XmlSiteMapProvider" 
		 siteMapFile="~/NewFolder1/Web2.sitemap" />
	   <add 
		 name="File2"
		 type="System.Web.XmlSiteMapProvider" 
		 siteMapFile="~/NewFolder2/Web3.sitemap" />
	 </providers>
	</siteMap>
  </system.web>
</configuration>

تم تعديل هذه المشاركة بواسطة kabrs في 5 فبراير 2007 في 00:17

طريقة حماية الصفحة بالصورة العشاوائية Captcha

/index.php?showtopic=117870

#6

مشكور يا اخي ولكن ليس بالامكان عمل طريقه بحيث تظهر map على حسب المستخدم ، اي كما ذكرت سابقا .

If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.

#7

طيب أخي, الطريقة الصحيحة لعمل ذلك هي:

1 - بفرض يوجد مجلد اسمه SiteMap في الـ Root وفيه ملفان:

ar.sitemap
en.sitemap

2 - افتح ملف الـ Web.Config واكتب فيه بعد <system.web>:

<siteMap>
<providers>
<add siteMapFile="~/Sitemap/ar.sitemap" name="ArAspNetXmlSiteMapProvider" type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, 
				PublicKeyToken=b03f5f7f11d50a3a"/>
<add siteMapFile="~/Sitemap/en.sitemap" name="EnAspNetXmlSiteMapProvider" type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, 
				PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</siteMap>

3 - بقي أمر واحد فقط, عند استخدام العنصر SiteMapDataSource من أجل الربط مع ملف sitemap, يجب أن تعطيه اسم الـ Provider المناسب كما يلي:

<asp:SiteMapDataSource SiteMapProvider="EnAspNetXmlSiteMapProvider"

ونفس الشيء بالنسبة لملف اللغة العربية, طبعاً تستطيع إعطاء اسم الـ Provider برمجياً إن دعت الحاجة

أرجو أن يلبي هذا الحل طلبك, وإلا اطرح كامل التفاصيل وسنساعد بقدر ما نستطيع إن شاء الله

#8

اشكرك يا اخي على هذا المجهود.

If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.

هذا الموضوع مغلق.

مواضيع مشابهة