¿Cómo puedo resolver esta afirmación?

I'm downloaded a template for my asp.net website. The templates is for Joomla CMS. I converted all but I have some problem in the header and can't understand what does it do and how can I specialize for asp.net:

    <jdoc:include type="head" /> 
 <link rel="stylesheet" href="<?php echo $this->baseurl ;?>/templates/system/css/system.css" type="text/css" /> 
 <link rel="stylesheet" href="<?php echo $this->baseurl ;?>/templates/system/css/general.css" type="text/css" /> 
 <link rel="stylesheet" href="<?php echo $this->baseurl ;?>/templates/<?php echo $this->template ;?>/css/template.css" type="text/css" /> 
<!--<?php if($this->direction == 'rtl') : ?> -->
 <link href="<?php echo $this->baseurl ;?>/templates/<?php echo $this->template ;?>/css/template_rtl.css" rel="stylesheet" type="text/css" /> 
 <?php endif; ?> 
 <!--[if lte IE 7]>
<link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/ie7.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if lte IE 6]>
<link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/ie6.css" rel="stylesheet" type="text/css" />
<![endif]-->

 <link id="JTKLocalCss" href="css/template.css" rel="stylesheet" type="text/css" />

preguntado el 31 de enero de 12 a las 08:01

3 Respuestas

You can replace the code <?php echo $this->baseurl ?>/ con <% = this.ResolveUrl("~/") %>

Para el código <?php echo $this->template ?>, reemplácelo con <% = this.ResolveUrl("~/") %> and then you must define a Template accessor in the codebehind:

protected string Template { get; set; }

This will then need to be set (e.g. on PageLoad) for the property to populate the code above.

Para la <?php if($this->direction == 'rtl') : ?> ... <?php endif; ?> statement, this can be replaced with:

<% if(this.Direction) {%>...<%}%>

Again this will need an accessor in the codebehind, much like the Template example.

Respondido el 31 de enero de 12 a las 13:01

Most of it is stylesheet linking. It allows the user to have an external styleseeht. Where it says php echo... this is basically a link to the base URL. You don't need those in and can replace with ~/

Respondido el 31 de enero de 12 a las 12:01

This won't work unless the code is within a <head runat="server"> element or if the <link> has a runat="server" attribute. - Digbyswift

thank you my friend but i thought it is a way to configure web page for another browser like IE or safari or opera. the main problem that i always have in web design is when make my content to be center with margin:auto; statement its only become center in Fire fox and not perform in IE what can i do for this???!! - Hussein Ojaghi

thanks digbyswift hadn't thought of adding this in. That is really a different question hussein. It would be much easier to either write the template yourself and learn more or get a template that is native html and avoid Joomla templates for all but joomla. - Daniel Casserly

No body could tell me how can i set element in center at IE, in firefox i use to write this statement : Margin:auto; - Hussein Ojaghi

We can if you ask it in the question. margin-left:auto; margin-right:auto should be fine cross browser - Daniel Casserly

i'm not a php guru but it seems very clear what those code do:

it insert the baseUrl constant in every stylesheet links

and load a right to left css if page has right to left text

<!--<?php if($this->direction == 'rtl') : ?> -->

Respondido el 31 de enero de 12 a las 13:01

thank you my friend but i thought it is a way to configure web page for another browser like IE or safari or opera. the main problem that i always have in web design is when make my content to be center with margin:auto; statement its only become center in Fire fox and not perform in IE what can i do for this???! - Hussein Ojaghi

sorry i'm a developper not a webdesign. i cannot help you. - giammin

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.