Jump to content

How make sidebar works when using custom wrapper


shahed

Recommended Posts

In pages app, I want to use a custom wrapper, instead of suite HTML wrapper. it's designed and I also bring drag and drop sidebar manager into this template, widgetcontainer are placed in this custom wrapper.

I can drag and drop widgets, but after reloading pages, they will disappears.

Why widgets disappears and how can I make it work.

 

 

Link to comment
Share on other sites

1 hour ago, shahed said:

In pages app, I want to use a custom wrapper, instead of suite HTML wrapper. it's designed and I also bring drag and drop sidebar manager into this template, widgetcontainer are placed in this custom wrapper.

I can drag and drop widgets, but after reloading pages, they will disappears.

Why widgets disappears and how can I make it work

 

Depends on your custom wrapper coding (you will need some of ips coding if want to use the block manager)

Otherwise you will need to create a block and then in your page add

{block="your_block_name"}

into the page where you want it to be

Link to comment
Share on other sites

12 minutes ago, steve00 said:

Depends on your custom wrapper coding (you will need some of ips coding if want to use the block manager)

Otherwise you will need to create a block and then in your page add


{block="your_block_name"}

into the page where you want it to be

Yes I implement relative IPS codes, and whole block manager system works, all the way until you just reloading the page and widgets where placed in area will disappears.

This is the custom wrapper code.

<!DOCTYPE html>
<html lang="{expression="\IPS\Member::loggedIn()->language()->bcp47()"}" dir="{{if member.language()->isrtl}}rtl{{else}}ltr{{endif}}">
	<head>
		<title>{expression="output.getTitle( $title )"}</title>
		{{if settings.ipbseo_ga_enabled}}
			{setting="ipseo_ga"}
		{{endif}}
		<!--[if lt IE 9]>
			{{foreach \IPS\Theme::i()->css( 'extra/ie8.css', 'core' ) as $css}}<link rel="stylesheet" type="text/css" href="{$css}">{{endforeach}}
		    <script src="{url="applications/core/interface/html5shiv/html5shiv.js" base="none" protocol="\IPS\Http\Url::PROTOCOL_RELATIVE"}"></script>
		<![endif]-->
		{template="includeMeta" app="core" group="global" location="global" params=""}
		{template="includeCSS" app="core" group="global" location="global" params=""}
		{template="includeJS" if="theme.js_include != 'footer'" app="core" group="global" location="global" params=""}
		{template="favico" app="core" group="global" location="front" params=""}
	</head>
  <body class='ipsApp ipsApp_front {{if isset( \IPS\Request::i()->cookie['hasJS'] )}}ipsJS_has{{else}}ipsJS_none{{endif}} ipsClearfix{{foreach output.bodyClasses as $class}} {$class}{{endforeach}} ipsLayout_noBackground' {{if output.globalControllers}}data-controller='{expression="implode( ',', output.globalControllers )"}'{{endif}} {{if isset( output.inlineMessage )}}data-message="{expression="output.inlineMessage"}"{{endif}} data-pageApp='{$location['app']}' data-pageLocation='front' data-pageModule='{$location['module']}' data-pageController='{$location['controller']}'>
		<a href='#elContent' class='ipsHide' title='{lang="jump_to_content_desc"}' accesskey='m'>{lang="jump_to_content"}</a>
		{template="offlineMessage" if="!settings.site_online && \IPS\Member::loggedIn()->group['g_access_offline']" app="core" group="global" params=""}
		<div id='ipsLayout_header' class='ipsClearfix'>
  		<header>
				<div class='ipsLayout_container'>
					{template="logo" app="core" group="global" params=""}
					{{if !in_array('ipsLayout_minimal', \IPS\Output::i()->bodyClasses )}}{template="userBar" app="core" group="global" params=""}{{endif}}
				</div>
		</header>
		{template="navBar" app="core" group="global" params=""}
        </div>
		{template="sidebar" if="theme.sidebar_position == 'left'" app="core" group="global" params="'left'"}
					<div id='ipsLayout_mainArea'>
						<a id='elContent'></a>
						{advertisement="ad_global_header"}
						{template="acknowledgeWarning" if="\IPS\Member::loggedIn()->members_bitoptions['unacknowledged_warnings']" params="\IPS\Member::loggedIn()->warnings( 1, FALSE )" group="global" app="core"}
						{{if !in_array('ipsLayout_minimal', \IPS\Output::i()->bodyClasses ) and !member.members_bitoptions['profile_completion_dismissed'] and $nextStep = member.nextProfileStep()}}
							{template="profileNextStep" group="global" app="core" params="$nextStep, true"}
						{{endif}}
						{template="widgetContainer" group="global" app="core" params="'header', 'horizontal'"}
						{$html|raw}
						{template="widgetContainer" group="global" app="core" params="'footer', 'horizontal'"}
					</div>
					
		{template="includeJS" app="core" group="global" location="global" params=""}
        <footer id='ipsLayout_footer' class='ipsClearfix'>
			<div class='ipsLayout_container'>
				{advertisement="ad_global_footer"}
				{template="footer" app="core" group="global" params=""}
			</div>
		</footer>
	</body>
</html>

 

Link to comment
Share on other sites

So you are saying by creating a new block and then adding

{block="your_block_name"}

into your page that it doesn't work (do not mean to drag and drop, you must use the code above in your page)

or create a new template, add your code above and use that for your page (see if that makes any difference)

Link to comment
Share on other sites

23 minutes ago, opentype said:

You could consider about other solutions, like a plugin to make the changes you need to the global template(s) on just a specific page

Yes this is something I consider. it's need whole a lot of reworks.

 

11 minutes ago, steve00 said:

So you are saying by creating a new block and then adding


{block="your_block_name"}

into your page that it doesn't work (do not mean to drag and drop, you must use the code above in your page)

or create a new template, add your code above and use that for your page (see if that makes any difference) 

No, this isn't what I said.

Yes adding blocks to template manually works all around in Page.

Link to comment
Share on other sites

Recently I created a new plugin for sidebar through

IPS\Helpers\Form\TextArea

But it's doesn't works properly with {block ="block_name"}. setting for template are already in place and I can add anything from texts to html tags, except custom blocks, these lines won't parser as blocks. Anyone have any Idea?

Capture.thumb.JPG.32677eadfcd04f4632aca3a934c638f9.JPG

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...