display an article in fullwidth using Gantry framework

More
11 years 3 months ago #46083 by rottenberg
Hello
Joomla version : j3.2.3
Fc version : RC V1875
Gantry version :4.1.22

I need to display an article in the fullwidth of the Gantry template and this page is to be responsive. Unfortunatelly, Gantry adds left and right margins in the main body position.
Gantry uses one position which is called 'fullwidth'.

I think about setting my article in the fullwidth position.

I have tested it for one article. It's working using the nonumber plugin 'component anywhere'. In the module I write this :

{component index.php/?option=com_flexicontent&view=item&id=xx}

where xx is the Article ID number.

In the FC template for the article I display no fields.

So I get the 'fullwidth' module with the content of the article and in the main body position I get an empty field.

That is working for one article.
I want now to get it for all articles. So I need to know when displaying the module what is the article Id displayed in the page.

Is the article ID a core field. So I can use the {{item->corefield}} to get this number ?

If you have another better solution to display a fullwidth article using Gantry framework I will be also glad to use it.

thank you for advices

best regards

Michel

Please Log in or Create an account to join the conversation.

More
11 years 3 months ago #46085 by rottenberg
I think I have found a solution to my problem.
This solution needs to use 'Rereplacer' and 'Sourcerer' components from Nonumber.

I have created a specific field 'displayed_content' which duplicates the 'description' field (but I could also duplicate others fields).
For the 'displayed content' field the option are the following :

- hidden required field
- the default value of the field : " "
- the default value is 'displayed instead of empty'
- the prefix is the following text : [idnum]{{item->text}}[/idnum]

The template attached to the article contains only one field in the description zone : 'displayed content'.

Displaying the article at this level : I get
Code:
[idnum](content of the description)[/idnum]

Using Rereplacer component will create a $_SESSION variable and erase the content of the article in the main body.

The Rereplacer content is the follwing :
Code:
{source 0} <?php $parm = ("[[escape]]\1[[/escape]]"); $_SESSION['article']['texte'] = $parm; ?> {/source}

I attach the file to import into Rereplacer.

Displaying the content in a module :
I have chosen the 'fullwidth' from Gantry framework.
I have created a customized content module.
The content used is the following :
Code:
{source 0}[[?php echo stripslashes($_SESSION['article']['texte']); ?]][[?php unset ($_SESSION['article']['texte']); ?]] {/source}

Of course we can use others contents to be mixed with this one.
the {source 0}{/source} allows to manage php or Javascript content without problem.
After displaying the $_SESSION. I delete it.

Please Log in or Create an account to join the conversation.

More
11 years 3 months ago #46089 by micker
cool can we add it in faq ?

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
11 years 3 months ago #46090 by rottenberg
Of course
no problem

best regards

Michel

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.368 seconds
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save