Jump to content
thirty bees forum
  • 0

Question: Admin ShortCodes? BaseURL for static pages or TB Blog URLs?


Acer

Question

Hi

I've been creating static links to TB Blog pages on the Main Menu, but because I'm working on three different environments, the base URLs will be different.
So when I move the site from Local to Staging and eventually to Live, I'll need to remember to update the base URLs every time.

I've noticed in the SEO section that there are a few "shortcodes" being used, like: 

{categories:/}{rewrite}{/:selected_filters}

Is there one for baseurl that can be used for a URL in Menu admin?
Like: URL: {baseurl}/blog/myblogpostpage

Also, is there a list of all the 'secret' shortcodes for PS 1.6 / TB for Admin (even product admin)?
I'm aware of some nice Smarty variables for the front-end, but here I'm specifically interested in something similar for the BO Admin.

 

 

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

Hi 

Because the URL you've given will give you a 404 on Local (takes you all the way to the localhost root)
My test blog post name is 'this-is-a-test'. So using your URL it would be /blog/this-is-a-test:

622599982_pathissueroot.png.55584e463831f3ca5e543243880f6918.png

Also, if you try something like this (no initial forward slash):
blog/this-is-a-test
It works until you browse the site for a bit, then try to access the link on the menu again -  then you get this:

path issue.png

path issue 2.png

Edited by Theo
Link to comment
Share on other sites

  • 0
10 minutes ago, Pierrox15 said:

Hello, In SEO&Urls Panel (adminXXX/index.php?controller=AdminMeta) Did you add "blog" in rewrite column "module-beesblog-post" module? [![Screenshot_2019-10-04 SEO URLs • Futurheli.png](//forum.thirtybees.com/applications/core/interface/js/spacer.png)](https://forum.thirtybees.com/uploads/monthly_2019_10/2050888777_Screenshot_2019-10-04SEOURLsFuturheli.png.962fd0fa6dfef4501ab3f2d614885781.png)

Screenshot_2019-10-04 SEO URLs • Futurheli.png

Hi

I've tried your suggestion, but still not working...

Link to comment
Share on other sites

  • 0

Hi

To clarify:
This is in the context of adding a static link to a blog post in the Main Menu (Admin) or anywhere else in Admin.
So whether I'm on the 'Edit product details page' or creating a link in the Main Menu to a static blog post URL, I'd like to be able to do the following:
{baseurl}/blog/blog-post-name

 

 

Edited by Theo
Link to comment
Share on other sites

  • 0

baseUrl of  your shop is manage in ShopUrl,  it is the basepath of your install
ex: localhost/myshop  yo don't need rewrite module for that.

After that you can configure rewrite for each controller in the SEO&Url Tab (screenshot)
ex ?controller=mycontroller  become /mycontroller  and you *need* apache mod rewrite for that

If i understand your problem, I will say: there is no easy way to maintain link in front Main menu, because module topmenu doesn't have entry for blog controllers. you would write an issue

Here:

https://github.com/thirtybees/blocktopmenu

Or here:

https://github.com/thirtybees

 

I don't think shortcode exist for that. but it will very nice to have somethink like this {product->id}, {blogpost->id} or {category->id} to use in form to generate url.

 

Edited by Pierrox15
Link to comment
Share on other sites

  • 0

Is there no way to include this baseUrl or ShopUrl in a tag somehow that we can then reuse wherever in Admin (product edit, URL link)?
Similar to Smarty's {$baseurl}
As creating static links to blog posts for example is going to become very difficult to maintain imo...

Link to comment
Share on other sites

  • 0

@Theo Right now it's not possible.

But you are right, that it's hard to maintain links like that. For our own shop I have created a little Shortcode System. Which replaces links in FO like [link blog="12"] or [link product="34"]. But this won't work on other system as it depends on blog module for example. 

Link to comment
Share on other sites

  • 0
26 minutes ago, wakabayashi said:

@Theo Right now it's not possible.

But you are right, that it's hard to maintain links like that. For our own shop I have created a little Shortcode System. Which replaces links in FO like [link blog="12"] or [link product="34"]. But this won't work on other system as it depends on blog module for example. 

Thanks for the feedback... Darn, this kinda sucks. Will create feature request in near future...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...