• Page 1 of 1
  • 1
Forum moderator: bigblog  
Curent page number
Mar1aN
Posts: 192
Reputation: 3

Message # 1 | 1:34 PM
I don't understand why uCoz offers $CURRENT_PAGE$ code inside a span?
In this way i can't use it in my meta title, and all pages with entries have the same name!

Sunny
Posts: 9296
Reputation: 456

Message # 2 | 4:19 PM
Mar1aN, if you want to set unique meta tags for each entry, you can do this with the help of additional fields. E.g. enable two additional fields, one for keywords and one for description, and then use the following code in the templates:

Code
<meta name="description" content="$OTHER1$" />   
<meta name="keywords" content="$OTHER2$" />

I'm not active on the forum anymore. Please contact other forum staff.
Mar1aN
Posts: 192
Reputation: 3

Message # 3 | 7:51 PM
Sunny, i want the curent page number from a module main page (/load/0-2).
Sunny
Posts: 9296
Reputation: 456

Message # 4 | 12:08 PM
Mar1aN, unfortunately it cannot be fixed, but it is possible to extract pure numbers without html with the help of conditions, e.g.:

Code
<?substr($CURRENT_PAGE$,28,-35)?>

I'm not active on the forum anymore. Please contact other forum staff.
Mar1aN
Posts: 192
Reputation: 3

Message # 5 | 12:57 PM
VZ
Posts: 189
Reputation: 3

Message # 6 | 3:59 AM
Would be helpful if you explained how you got 28,-35 thanks and sorry if off topic.
Hit that "Thanks" button. :)
In life there's ALWAYS limits but do not plan above them.
Sunny
Posts: 9296
Reputation: 456

Message # 7 | 8:40 AM
VZ,

Quote
substr(S,N1,N2)
substr(S,N1)

It returns a substring from string S, starting from position N1 (the first character has position 0), of the length equal to N2 characters. Parameter S must be specified as a string (or as a result of calling a function that returns a string). N1 and N2 are reduced to integer values. If N2 is not specified then a substring from position N1 to the end of string S is returned. If N1 is negative then the initial position is counted from the end of string S. If N2 is negative then it sets the final position from the end of string S. (<?substr('Hello',2)?> will return 'llo', <?substr('Hello',2,2)?> will return 'l', <?substr('Hello',-2)?> will return 'lo', <?substr('Hello',0,-2)?> will return 'Hel').


This is from the info on conditional operators, available in Control Panel under each template.

I'm not active on the forum anymore. Please contact other forum staff.
VZ
Posts: 189
Reputation: 3

Message # 8 | 6:05 PM
Quote Sunny ()
<?substr('Hello',0,-2)?> will return 'Hel').

its -2 so it adds 1 in order to return three characters?
I tried to mess around with it i had no good results.

Hit that "Thanks" button. :)
In life there's ALWAYS limits but do not plan above them.
Post edited by VZ - Saturday, 2014-05-17, 6:06 PM
Sunny
Posts: 9296
Reputation: 456

Message # 9 | 1:41 PM
Quote VZ ()
its -2 so it adds 1 in order to return three characters?


It subtracts 2 last characters. What exactly are you trying to do?

I'm not active on the forum anymore. Please contact other forum staff.
VZ
Posts: 189
Reputation: 3

Message # 10 | 10:07 PM
Subtract the last characters, how can i subtract the checkbox values in user settings, "$OPTIONS_FL$"
Quote Sunny ()

It subtracts 2 last characters. What exactly are you trying to do?

Hit that "Thanks" button. :)
In life there's ALWAYS limits but do not plan above them.
Sunny
Posts: 9296
Reputation: 456

Message # 11 | 2:00 PM
VZ, please describe what you want to do in more detail.
I'm not active on the forum anymore. Please contact other forum staff.
  • Page 1 of 1
  • 1
Search: