Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#157 2020-02-07 14:22:09
Re: Dev news
colak wrote #321564:
In this example Oleg starts with
<txp:pages total="200" evaluate="3,7,5">
which it did not work
It did, what did not work was <txp:pages total evaluate="3,7,5">
for the reason explained above: <txp:pages total />
is supposed to output the number of pages.
In the new article list pagination system of tags, are there any best practices recommendations on when we should be using
pages
and when to use other tags?
They are still moving, but the global rule is: use <txp:pages />
as pagination container when you need to reset pagination parameters pg
and total
, for example when creating custom pagination bars.
Offline
#158 2020-02-07 14:44:59
Re: Dev news
etc wrote #321565:
They are still moving, but the global rule is: use
<txp:pages />
as pagination container when you need to reset pagination parameterspg
andtotal
, for example when creating custom pagination bars.
Whoops, I did not want it to sound that I was pointing fingers. Apologies. I’m just trying to understand the concepts in order to be able to help others. This makes sense now. Thanks to both.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#159 2020-02-07 14:49:38
Offline
#160 2020-02-10 17:11:53
Re: Dev news
I updated my Complex Pagination using all the discussion ideas here.
It now only requires one block of code and no plugins.
Offline
#161 2020-02-14 11:41:16
Re: Dev news
Is there some documentation or some explanation of this <txp:pages />
tag noted above ? I’m trying to understand what is happening in the above posts, but it is a bit hard to follow.
philwareham wrote #321558:
The new tag stuff make my head spin a bit at times (in a good way) […]
We should do a small series of blog posts […]
Yes, a good idea. As I said above, this new navigation stuff in particular is still quite mysterious. Some other tags too, I don’t fully grog their scoop, yet.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
#162 2020-02-24 12:15:28
- singaz
- Member
- Registered: 2017-03-12
- Posts: 150
Re: Dev news
I do not know in which section to ask this question, I write here
Textpattern 4.8.0 beta.3
I use in Advanced options:
[js]
mediatype="application/javascript"
title="JavaScript"
[xml]
mediatype="application/xml"
title="XML page"
and so wrote:
[js]
mediatype="text/javascript"
title="JavaScript"
[xml]
mediatype="application/xml"
title="XML page"
I write on the site this:
<script type='text/javascript' src="<txp:page_url type="theme_path" />/js/slimbox.js"></script>
and this:
<script src="<txp:page_url type="theme_path" />/js/slimbox.js"></script>
and this:
<script type='text/javascript' src='<txp:page_url type="theme_path" />/js/navigation.min.js'></script>
and this on demo site:
<script type='text/javascript' src='<txp:page_url type="theme_path" />/js/navigationmin.js'></script>
The XML sitemap is working correctly.
With java script I get an error, not found.
hosting one:
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL /themes/default/js/slimbox.js was not found on this server.</p>
second hosting:
<title> 404 Not Found</title></head>
<h1 style="margin:0; font-size:150px; line-height:150px; font-weight:bold;">404</h1>
<h2 style="margin-top:20px;font-size: 30px;">Not Found</h2>
<p>The resource requested could not be found on this server!</p>
and demo site:
<script type='text/javascript' src='https://beta-demo.textpattern.co/themes/four-point-eight/js/navigationmin.js'></script>
Where is my mistake?
I missed something and I do not know what.
Sorry my horror English. I’m learning textpattern, I’m learning English
Offline
#163 2020-02-24 12:47:53
Re: Dev news
If you saved your script in the disk, you can use
<txp:output_form form="slimbox.js" format="flat.script" />
>Edited to add that the name of your js in the form should be slimbox.js
, with the extension! Also, the form type should be js (Application/javascript)
, again selected from the pull-down in the form.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#164 2020-02-24 13:14:30
- singaz
- Member
- Registered: 2017-03-12
- Posts: 150
Re: Dev news
<txp:output_form form="slimbox.js" format="flat.script" />
This is working correctly. Many thanks!
Sorry my horror English. I’m learning textpattern, I’m learning English
Offline
#165 2020-07-31 08:45:25
Re: Dev news
I’ve spun up a thread specifically for 4.9.0 upcoming changes here
Offline
#166 2021-10-17 09:02:38
Re: Dev news
Making breakby
, limit
, offset
and sort
global in 4.8.8 allows for easier lists processing. Example:
<txp:variable name="fruits" value="apple, banana, cranberry" />
<txp:variable name="fruits" breakby="," break="+" sort="rand" />
<!-- outputs something like banana+apple+cranberry -->
<txp:variable name="fruits" breakby="," sort="rand" limit="1" />
<!-- outputs something like banana -->
<txp:variable name="fruits" breakby="," break="+" offset="-1, 1" />
<!-- outputs cranberry+apple -->
List items can also be processed as <+>
or <txp:yield item />
via breakform
.
Please test, comment and suggest.
Offline
#167 2021-10-18 13:49:49
Re: Dev news
Wow, that s amazing,
hope someone dont forget to put you examples on variable doc page.
Cheers.
Offline
#168 2021-10-18 14:10:18
Re: Dev news
Thanks! It’s not really a <txp:variable />
feature, but a global one. For example,
<txp:hide process="1" breakby break="," sort="rand">
apple, banana, cranberry
</txp:hide>
works as well.
Offline