How can I solve this instruction

I uploaded a template for my asp.net site. Templates designed for Joomla CMS. I converted everything, but I have some problems in the header and cannot figure out what it does and how I can specialize in 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" /> 
+4
source share
3 answers

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

For the code <?php echo $this->template ?> Replace it with <% = this.ResolveUrl("~/") %> , and then you must define the template accessory in the code:

 protected string Template { get; set; } 

Then, you need to set this property (for example, on the PageLoad page) to populate the code above.

For the operator <?php if($this->direction == 'rtl') : ?> ... <?php endif; ?> <?php if($this->direction == 'rtl') : ?> ... <?php endif; ?> can this be replaced by:

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

Again, this will require an accessory in the code, as well as an example template.

+1
source

Most links to styles. This allows the user to have an external style. Where he says php echo ... this is basically a link to the base URL. You do not need them and can replace with ~ /

0
source

I am not a php guru, but it seems very clear what this code does:

it inserts the baseUrl constant into each link of the stylesheet

and load css from right to left if the page has the right to left text

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

Source: https://habr.com/ru/post/1393929/


All Articles