printer_friendly_block, Forcing a theme
Posted
#4822
(In Topic #973)
I have installed the printer_friendly_block add-in,
Is it possible to force the printer_friendly_block to use a different theme ?
Currently it opens a new window, and appends index.php?page=start&wide_print=1, but is it possible to modify this so that is forces a specific template
IE index.php?page=start&wide_print=1&keep_theme=print_theme
Where and what would i need to edit to achieve this.
Many Thanks
Chris
Posted
1) Just put out your own print link with something like <a href="{$SELF_URL*,0,0,0,keep_print=1,keep_theme=sometheme}">Print me</a>.
2) In the BLOCK_SIDE_PRINTER_FRIENDLY template change {URL} to {$EXTEND_URL,{URL},keep_theme=sometheme}.
Posted
{URL}&keep_theme=default
Also, is there a list somewhere of standard/advanced URL structures/parameters that Composr uses? I'm eager to learn them
Posted
Joe said
Chris, can you explain the advantage of using {$EXTEND_URL} over, let's say something like this:
{URL}&keep_theme=default
Also, is there a list somewhere of standard/advanced URL structures/parameters that Composr uses? I'm eager to learn them![]()
From “Post #5165”, 11th Feb 2019
Because you're assume URL has a ? in it. The first parameter has to be preceded with a question mark. Different URL schemes will also use different ways of putting parameters together, so it's risky to make any assumptions.
Posted
Code
{$EXTEND_URL,{$CANONICAL_URL},keep_lang={$LANG},_rid=1}
Whichever I place first gets added, be it _rid or keep_lang but it isn't accepting both as per the tutorial example of
Code
{$EXTEND_URL,http://example.com/index.php?foo=a,bar=b}
Posted
Posted
KingBast said
Slightly off-topic from the original post, but I recently changed my URL's to use the logic. However, I cannot seem to get more than one extended param to work.
Code
{$EXTEND_URL,{$CANONICAL_URL},keep_lang={$LANG},_rid=1}
Whichever I place first gets added, be it _rid or keep_lang but it isn't accepting both as per the tutorial example ofCode
{$EXTEND_URL,http://example.com/index.php?foo=a,bar=b}
From “[solved] Missing editor toolbar on a mobile cell phone?”, 15th Feb 2019
Maybe it's possible that a bug in {$EXTEND_URL} is restricting the symbol from reading any more than 1 parameter.
Here's a possible work-around you could use; I've tested and it seems to work:
Code
{$SET,next_href,{$EXTEND_URL,{$CANONICAL_URL},keep_lang={$LANG}}}
{$EXTEND_URL,{$GET,next_href},_rid=1}..or you could probably just daisy-chain the {$EXTEND_URL} symbol, like so:
Code
{$EXTEND_URL,{$EXTEND_URL,{$CANONICAL_URL},keep_lang={$LANG}},_rid=1}Both solutions are the same, but setting a variable makes it easier to read and debug imo.
Posted
Posted
Code
{$EXTEND_URL,{$CANONICAL_URL},keep_lang={$LANG}&_rid=1}
I've fixed the docs to correspond.
Posted
Code
{$SELF_URL,0,0,0,keep_lang={$LANG},_rid=1}
Posted
EXTEND_URL would usually be used with some URL which isn't derived from the current URL.
Posted
Posted
Chris Graham said
Joe said
Also, is there a list somewhere of standard/advanced URL structures/parameters that Composr uses? I'm eager to learn them![]()
From “Post #5165”, 11th Feb 2019
From “Post #5167”, 12th Feb 2019
I meant more along the lines of a list of URL parameters that are supported by Composr. For example, a list that includes parameters such as keep_theme=, wide_high= and safe_mode=, or maybe even some for debugging purposes…
Thanks.
Posted
7 guests and 0 members have recently viewed this.