Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2023-01-21 16:53:03
- franzl
- Member
- From: germany
- Registered: 2019-08-11
- Posts: 33
deactivate something...
Hi there.
How to deactivate the page_title in the meta data “title”?
And how to deactivate RSS feeds and Atom?
Last edited by franzl (2023-01-21 16:55:53)
Offline
Re: deactivate something...
In the default template, the sidebar info is supplied in the ‘body-aside’ Form. So navigate to that in your current theme and look for the <txp:feed_link>
tag. Remove it to get rid of the feeds.
As for the title, I’m not quite sure I follow, sorry. What are you trying to eliminate?
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#3 2023-01-22 11:42:56
- franzl
- Member
- From: germany
- Registered: 2019-08-11
- Posts: 33
Re: deactivate something...
Thanks for your reply.
No thats not what I´m searching for.
You can open RSS feeds by typing yourdomain.com/rss
I want to disable this function.
Textpattern has this function: https://txptag.org/txp/page_title
I want to disable the part “your site name”. It takes to much space. You don´t have this space on searchengines results pages.
Last edited by franzl (2023-01-22 12:31:27)
Offline
Re: deactivate something...
As far as I’m aware you can only alter the type of info that the rss feed gives out (via the prefs). You can’t turn it off to stop someone using that path in the browser bar.
Edit: although I’ve never tried making a section called ‘rss’ and then deliberately sending a 404 status or a redirect in the assigned page template. That might work, but if memory serves, the special URL paths like /rss and /file_download etc are checked first, so that might not work.
As for the page title tag, it is a fixed format. You can alter the separator only. If you wish to display something else, you can build your own meta tag and inject Txp tags into it.
Last edited by Bloke (2023-01-22 14:34:52)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: deactivate something...
Bloke wrote #334552:
Edit: although I’ve never tried making a section called ‘rss’ and then deliberately sending a 404 status or a redirect in the assigned page template. That might work, but if memory serves, the special URL paths like /rss and /file_download etc are checked first, so that might not work.
This is actually tempting, given that feeds customization is a popular request.
As for the page title tag, it is a fixed format. You can alter the separator only. If you wish to display something else, you can build your own meta tag and inject Txp tags into it.
We could alter this tag in 4.9, considering that empty separator
means ‘do not append the site name’.
Offline
Re: deactivate something...
etc wrote #334553:
This is actually tempting, given that feeds customization is a popular request.
Works for me! Would we allow override of all built in URL routes? Category, author, file download, …? Or does that give us some horrendous issues with built-in tag output?
We could alter this tag in 4.9, considering that empty
separator
means ‘do not append the site name’.
Nice idea.
Last edited by Bloke (2023-01-22 17:50:08)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: deactivate something...
Bloke wrote #334554:
Works for me! Would we allow override of all built in URL routes? Category, author, file download, …? Or does that give us some horrendous issues with built-in tag output?
Dunno. Category/author/etc are filters rather than presentation, so I would leave them as is. But even with atom/rss
‘sections’ there could be some issues: they shouldn’t accept any article, their output is theme-dependent and so on.
Nice idea.
Meanwhile, there is a quick’n‘dirty
<txp:page_title trim=' | <txp:site_name />' replace="" />
Offline
Re: deactivate something...
etc wrote #334555:
Category/author/etc are filters rather than presentation, so I would leave them as is.
Makes sense. And yes, opening up custom feeds is caveat utilitor. But however we slice it, if we want to let people control what gets output from the database, that’s the nature of the beast.
Syndicating content currently from a single URL path /rss
means we can only have one feed structure for the entire site, and the feed handler (iirc) automatically responds to ?s=
(?c=
, etc) to allow content from only that section/category to be syndicated, correct?
If we did this in custom, theme-specific pages/forms, people would need to use <txp:evaluate>
or equivalent (e.g. <page::url>
) to grab the URL vars and act accordingly if they wanted to syndicate sections differently.
Is there any way we could make this more helpful by, I dunno, allowing something like this in the page:
<txp:feed section="sec1, sec2">
// Feed handler for the given sections.
</txp:feed>
<txp:feed category="somecat, anothercat">
// Feed handler for the given categories.
<txp:else />
// Feed handler for any other category.
</txp:feed>
<txp:feed section="sec3">
// Feed handler for the given section.
</txp:feed>
Or summat like that? The else thing probably won’t work as it contravenes our existing concept of having to nest conditionals before handling else blocks.
Just throwing ideas out.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: deactivate something...
franzl wrote #334551:
I want to disable the part “your site name”. It takes to much space. You don´t have this space on searchengines results pages.
You can build it manually. For individual articles, I use this pattern:
<txp:if_individual_article>
<title>
<txp:title /> | <txp:site_name />
</title>
</txp:if_individual_article>
For listing / landing pages , a similar pattern, but with <txp:section title />
. Idem dito for category pages and so on. Ad or remove what you want/need/…
The sky is the limit in terms of customisations. Textpattern can be very flexible.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: deactivate something...
Bloke wrote #334556:
Syndicating content currently from a single URL path
/rss
means we can only have one feed structure for the entire site, and the feed handler (iirc) automatically responds to?s=
(?c=
, etc) to allow content from only that section/category to be syndicated, correct?
Drat, this ‘double’ /rss?s=somesec
section URLs look intricate. Needs further thinking.
Meanwhile, could we disable the default feeds output if there is no in_rss
section? Looks natural.
Offline
Re: deactivate something...
That sounds reasonable.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#12 2023-01-24 17:43:49
- franzl
- Member
- From: germany
- Registered: 2019-08-11
- Posts: 33
Re: deactivate something...
Thanks for for your quick&dirty solution on the meta-title.
So there is no way to disable rss and atom. Thanks for the hint.
Last edited by franzl (2023-01-24 17:46:25)
Offline