How do I change navbar logo and styling dynamic? - mdriven

I am building a multi tenant platform and want to have different logos and styling of the navbar depending on logged in user or some other business rule. How do I do that?
If I want to add widgets on the navbar, for example notification indicator, how do I do that?

An interesting possiblity is to make a component, and that component includes a /style tag that is data-bound. You can also include base64 coded images that is used by the css in your component.
For inserting stuff in the navbar maybe you can use pseudo elements from CSS.
Otherwise I would install a local Turnkey development like this https://wiki.mdriven.net/index.php/Development_in_Visual_Studio. Then you can change any part of the site.

Related

TYPO3 Add Copy and Paste icons to Content Elements

Is it possible to add icons to the left or right side for Content Elements? I would like to move some of the functionality from the contextMenu to the icon bar, is that possible? Perhaps by TSConfig ? See attachment.
Several options exist for multiple TYPO3 versions and depending on where you would prefer to add the copy/cut icon, or indeed, any other icon you might wish:
Before 10.3 and without fluid-based page layout module:
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks']
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawFooter']
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem'] through $outHeader variable.
After 10.3 with fluid-based page layout module:
All of the above, plus
Overlay of template EXT:backend/Resources/Private/Partials/PageLayout/Record/Header.html, or
Overlay of template EXT:backend/Resources/Private/Partials/PageLayout/Record/Footer.html, or
Overlay of template EXT:backend/Resources/Private/Partials/PageLayout/Record.html depending on where you want the icon to be placed
These should provide you with every conceivable option for adding the icon precisely where you wish it to be added. TYPO3 10.3 with fluid based page module enabled provides you with the createst flexibility. Earlier versions or with fluid based page module disabled should probably use $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks'].
I personaly wouldn't add too many button visible by default on the top right of each content, because it will unnecessarily overloads the amount of information on the page module with action buttons that are not the most often used.
In particular, the "paste" button should only appears when there is something in the clipboard, and it now appears everywhere you can paste (you can see one above the content in your screenshot).
Cheers,
Rachel

AEM/CQ5 how to share component values?

I want to have a header component that is shared across multiple page rendering components. The header component has a text label. How do I make the value of this text label available to all page components.
Do I have to make the path in the <cq:include> to a common format?
Design mode, if properly understood, can work quite well. However, it doesn't replicate content in the same manner as page activation, and thus can be confusing for your authors. Also, the sharing model is limited to the exact page type - which may or may not be the granularity you desire.
From CQ5's Best Practices (https://dev.day.com/docs/en/cq/current/developing/developing_guidelines_bestpractices.html), they strongly encourage the paragraph system (iparsys to inherit/share). iparsys named the same can be shared across different page templates (while design mode will only apply to a single template type).
I can archive that by creating a design dialog that is similar to dialog (http://dev.day.com/docs/en/cq/5-6/developing/components.html#Dialogs) under the header component. You add the text label field to design dialog. And to enter value for the field, you switch the page to the design mode and click on Edit button on the top of the component. The entered value will be available to all pages that contain the header component.
Note: design dialog will be named as design_dialog
This functionality is now offered in ACS AEM Commons as Shared Component Properties - http://adobe-consulting-services.github.io/acs-aem-commons/features/shared-component-properties.html
Supports standard content activation and internationalization (values stored below the homepage) and anything else you would expect from content.
If the component is baked in the template(i,e page rendering component), yes you can make the <cq:include> path attribute to point to some common place where the data for this is stored and all the pages irrespective of , type of the template can get the values configured.
You can create header component and then include it using <cq:include> in base template/page. This base template/page will be inherited by all other templates. This way the header once configured in base page is availble through out different templates/page components.
If the goal is to share "across multiple page rendering components" the design dialog will only help if the page share the same rendering component.
If you want to have the header component displayed in a page and all its subpages, then you should use iparsys.
If you just want to reuse the properties of that header component, then it needs to have a fixed path (cq:include in a page component) and then you can reference the properties you need in other page rendering components. I would not suggest that approach since it breaks the idea of having a component. Everything becomes tightly coupled.
What you could also do is save those properties at the page level (some top parent page) and then use InheritanceValueMap in the subpages to read those properties.

How to create some custom box into a Typo3 web page?

I am very new in Typo3 world (I came from Joomla and WordPress) and I have some doubts related a thing that has been requested by a customer that use Typo3 for its site
He ask me to create some colored boxes into a specific page. Each of these boxes simply must contain text or links.
How can I do this?
I am thinking that I can solve in the following way (but I have not idea if this is a GOOD solution):
In the backend I go in the Page section and I open the settings related to the page that I have to modify
Here I have 3 columns (Left, Normal, Right) and for example I add a NEW Regular Text Element into this central column
Now appear to me the wysiwyg editor, so I click on the Toggle text mode icon and I pass from the wysiwyg mode to the pure HTML editor's mode and now I will create some div tags (settings the CSS settings for the background color and the dimension) that rappresent my boxes (and into these div I put their textual contents).
Is it a possible solution or is it a bad solution?
Tnx
Andrea
You may either use the RTE typoscript config to add some new paragraph styles, which will make the boxes or use the section_frame field in tt_content, a field called "frame" in the backend when you edit a content record. Both solutions would just need some typoscript (which you will deal with very often in the TYPO3 world) and CSS code.
If you need some more structure in the backend, there is also an extension for that called multicolumn. If you just need "more" columns in the backend (in combination with backend layouts) to achieve different looks, this can also be done by adding some typoscript config. To give you a more precise recommendation, some sort of scribble or design screenshot of what you want would be nice.

drupal 7 forms : custom rendering

drupal_render($form) works fine for my purposes in general, but there are cases where I'd like a form to have a different layout style
(specifically I'd like all the fields and submit button to appear in one horizontal row)
Is there a way to specify a different rendering for a specific form, and leave the rest with the default rendering for the theme?
If it's the layout you want to change, most likely, you'd want to change the CSS, not the markup.
If you want to display all the fields and submit button in a row, you could change them into blocks and "float: left;" them.

Joomla: How to show a different image on every page

I'm new to Joomla, but I figured out how to set it up and create my first joomla template which only includes the content area and a top menu.
Now I want to display a different images on every page.
I do not know how to do it in Joomla, because as far as I know I can only write articles (with images in them, which is not what I want) and include them in the Menu Items as Layout: Article.
Can I somehow create my own parameters for the Layout: Article and use them in my template? The cms user should be able to decide which image to show on each "page".
You can do it by means of a module. You can define for which menu position each module is visible. You can put any article inside a module with a Article as Module extension
You can find a lots of modules at http://extensions.joomla.org/ which you can install from your administrator and enable it on a position to show different images on different pages.
check this page
http://extensions.joomla.org/extensions/photos-a-images/images-rotators
Header Image
https://support.pillwax.com/open-source/doku.php?id=joomla:header_image
This allows you to place your images in a folder and name them according to the page. You can match to articleid, menuid, category, section, or even show a rotating random image.
You would then just need to publish the module in the correct position.